From: Everton L. B. <ev...@fa...> - 2004-01-07 17:41:44
|
Hi, I have been installed rlib 1.1.6 (libcpdf 2.02r1-0) on slackware 9.1, php 4.3.4, postgresql 7.4.1. The compilation was sucessful but when I run a simple report (from my examples, at RH9 them runs) rlib say: ** NUTS.. WE CRASHED Quit (core dumped) Follow the stack trace of core: Reading symbols from /usr/lib/libcpdf.so.2...done. Loaded symbols for /usr/lib/libcpdf.so.2 Reading symbols from /usr/local/lib/libr-postgre.so...done. Loaded symbols for /usr/local/lib/libr-postgre.so #0 0x40318ac1 in kill () from /lib/libc.so.6 (gdb) bt #0 0x40318ac1 in kill () from /lib/libc.so.6 #1 0x404a559b in myFaultHandler (signum=11, si=0x0, aptr=0x0) at util.c:46 #2 0x405c3c45 in __pthread_sighandler () from /lib/libpthread.so.0 #3 <signal handler called> #4 0x4036ae53 in strlen () from /lib/libc.so.6 #5 0x0815503e in _estrdup (s=0x2 <Address 0x2 out of bounds>) at /usr/local/src/php-4.3.4/Zend/zend_alloc.c:363 #6 0x404317be in zif_rlib_add_report (ht=2, return_value=0x0, this_ptr=0x0, return_value_used=0) at php.c:247 #7 0x08171c1e in execute (op_array=0x8252c9c) at /usr/local/src/php-4.3.4/Zend/zend_execute.c:1616 #8 0x0816413f in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/local/src/php-4.3.4/Zend/zend.c:884 #9 0x0813ad58 in php_execute_script (primary_file=0xbffff950) at /usr/local/src/php-4.3.4/main/main.c:1729 #10 0x08176bf6 in main (argc=2, argv=0xbffff9e4) at /usr/local/src/php-4.3.4/sapi/cli/php_cli.c:819 #11 0x40304d06 in __libc_start_main () from /lib/libc.so.6 Mysql database causes same error. Help-me :/ -- Everton Luis Berz Nucleo de Sistemas :: FACCAT - Faculdades de Taquara +55 51 541 6600 - R.624 ICQ 7807919 |
From: Bob D. <bd...@si...> - 2004-01-07 20:44:22
|
Hey, how are you calling rlib_add_report thats seems to be what is causing the crash.. because we are estrduping a null pointer.. this should not be possible if PHP is behaving right because we have this if(mainloop_count > 0) rlib_add_report(rip->r, estrdup(name), estrdup(mainloop)); else rlib_add_report(rip->r, estrdup(name), NULL); On Wed, 2004-01-07 at 12:40, Everton Luis Berz wrote: > Hi, > I have been installed rlib 1.1.6 (libcpdf 2.02r1-0) > on slackware 9.1, php 4.3.4, postgresql 7.4.1. > The compilation was sucessful but when I run a simple > report (from my examples, at RH9 them runs) rlib say: > > ** NUTS.. WE CRASHED > Quit (core dumped) > > Follow the stack trace of core: > > Reading symbols from /usr/lib/libcpdf.so.2...done. > Loaded symbols for /usr/lib/libcpdf.so.2 > Reading symbols from /usr/local/lib/libr-postgre.so...done. > Loaded symbols for /usr/local/lib/libr-postgre.so > #0 0x40318ac1 in kill () from /lib/libc.so.6 > (gdb) bt > #0 0x40318ac1 in kill () from /lib/libc.so.6 > #1 0x404a559b in myFaultHandler (signum=11, si=0x0, aptr=0x0) at util.c:46 > #2 0x405c3c45 in __pthread_sighandler () from /lib/libpthread.so.0 > #3 <signal handler called> > #4 0x4036ae53 in strlen () from /lib/libc.so.6 > #5 0x0815503e in _estrdup (s=0x2 <Address 0x2 out of bounds>) at > /usr/local/src/php-4.3.4/Zend/zend_alloc.c:363 > #6 0x404317be in zif_rlib_add_report (ht=2, return_value=0x0, > this_ptr=0x0, return_value_used=0) at php.c:247 > #7 0x08171c1e in execute (op_array=0x8252c9c) at > /usr/local/src/php-4.3.4/Zend/zend_execute.c:1616 > #8 0x0816413f in zend_execute_scripts (type=8, retval=0x0, > file_count=3) at /usr/local/src/php-4.3.4/Zend/zend.c:884 > #9 0x0813ad58 in php_execute_script (primary_file=0xbffff950) at > /usr/local/src/php-4.3.4/main/main.c:1729 > #10 0x08176bf6 in main (argc=2, argv=0xbffff9e4) at > /usr/local/src/php-4.3.4/sapi/cli/php_cli.c:819 > #11 0x40304d06 in __libc_start_main () from /lib/libc.so.6 > > > > Mysql database causes same error. > > Help-me :/ |
From: Everton L. B. <ev...@fa...> - 2004-01-08 12:17:27
|
hi, follow the php source code.. <? dl ("librlib.so"); $sql = "select c.id_company, c.name AS company_name, j.id_people, p.name AS people_name, j.salary, to_char(j.salary, 'R$ 99999D99') AS salary_br from job j inner join company c on (c.id_company = j.id_company) inner join people p on (p.id_people = j.id_people) "; $rlib = rlib_init(); rlib_add_datasource_postgre($rlib, "pgsql", "host=localhost dbname=rlib_examples_latin user=postgres"); rlib_add_query_as($rlib, "pgsql", $sql, "jobs"); rlib_add_report($rlib, "jobs.xml"); rlib_set_output_format_from_text($rlib, $format); rlib_execute($rlib); header( rlib_get_content_type($rlib)); rlib_spool($rlib); rlib_free($rlib); ?> This code works perfect at my Red Hat 9 box. I think that php 4.3.4 causes the error, it's a unique difference between my computers (and linux distro..). Somebody tested rlib on php 4.3.4 ? Bob Doan escreveu: > Hey, > > how are you calling rlib_add_report > > thats seems to be what is causing the crash.. because we are estrduping > a null pointer.. this should not be possible if PHP is behaving right > because we have this > > if(mainloop_count > 0) > rlib_add_report(rip->r, estrdup(name), estrdup(mainloop)); > else > rlib_add_report(rip->r, estrdup(name), NULL); > > > > > -- Everton Luis Berz Nucleo de Sistemas :: FACCAT - Faculdades de Taquara +55 51 541 6600 - R.624 ICQ 7807919 |
From: Bob D. <bd...@si...> - 2004-01-08 14:36:11
|
Hi, In bindings/php/php.c You will see ZEND_FUNCTION(rlib_add_report) Can you add the rlogit line.. run your report.. crash.. but then look @ the apache log (or command line depending on how you did it).. and tell me what it says.. this looks like a PHP problem I think - Bob ZEND_FUNCTION(rlib_add_report) { zval *z_rip = NULL; int whatever, mainloop_count; char *name, *mainloop; rlib_inout_pass *rip; int id = -1; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|s", &z_rip, &name, &whatever, &mainloop, &mainloop_count) == FAILURE) { return; } rlogit("WTF.. NAME LENGTH = %d, MAINLOOP COUNT = %d\n", whatever, mainloop_count); ZEND_FETCH_RESOURCE(rip, rlib_inout_pass *, &z_rip, id, LE_RLIB_NAME, le_link); if(mainloop_count > 0) rlib_add_report(rip->r, estrdup(name), estrdup(mainloop)); else rlib_add_report(rip->r, estrdup(name), NULL); } On Thu, 2004-01-08 at 07:17, Everton Luis Berz wrote: > hi, > > follow the php source code.. > <? > dl ("librlib.so"); > > $sql = "select c.id_company, c.name AS company_name, j.id_people, > p.name AS people_name, j.salary, to_char(j.salary, 'R$ 99999D99') AS > salary_br from job j > inner join company c on (c.id_company = j.id_company) > inner join people p on (p.id_people = j.id_people) "; > > $rlib = rlib_init(); > rlib_add_datasource_postgre($rlib, "pgsql", "host=localhost > dbname=rlib_examples_latin user=postgres"); > rlib_add_query_as($rlib, "pgsql", $sql, "jobs"); > rlib_add_report($rlib, "jobs.xml"); > rlib_set_output_format_from_text($rlib, $format); > rlib_execute($rlib); > header( rlib_get_content_type($rlib)); > rlib_spool($rlib); > rlib_free($rlib); > ?> > > This code works perfect at my Red Hat 9 box. > I think that php 4.3.4 causes the error, it's a unique > difference between my computers (and linux distro..). > Somebody tested rlib on php 4.3.4 ? > > |
From: Everton L. B. <ev...@fa...> - 2004-01-08 18:41:26
|
result: WTF.. NAME LENGTH = 8, MAINLOOP COUNT = 136146712 ** NUTS.. WE CRASHED Quit (core dumped) Bob Doan escreveu: > Hi, > > In bindings/php/php.c > > You will see ZEND_FUNCTION(rlib_add_report) > > Can you add the rlogit line.. run your report.. crash.. but then look @ > the apache log (or command line depending on how you did it).. > and tell me what it says.. this looks like a PHP problem I think > > - Bob > > > ZEND_FUNCTION(rlib_add_report) { > zval *z_rip = NULL; > int whatever, mainloop_count; > char *name, *mainloop; > rlib_inout_pass *rip; > int id = -1; > > if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|s", &z_rip, > &name, &whatever, &mainloop, &mainloop_count) == FAILURE) { > return; > } > > rlogit("WTF.. NAME LENGTH = %d, MAINLOOP COUNT = %d\n", whatever, > mainloop_count); > > ZEND_FETCH_RESOURCE(rip, rlib_inout_pass *, &z_rip, id, LE_RLIB_NAME, > le_link); > > if(mainloop_count > 0) > rlib_add_report(rip->r, estrdup(name), estrdup(mainloop)); > else > rlib_add_report(rip->r, estrdup(name), NULL); > > } > > -- Everton Luis Berz Nucleo de Sistemas :: FACCAT - Faculdades de Taquara +55 51 541 6600 - R.624 ICQ 7807919 |
From: Bob D. <bd...@si...> - 2004-01-08 22:55:02
|
Well... it seems like a php bug to me now... mainloop_count should be < 0 since you didn't pass it in.. but I think we can work around it can you change the rlogit to something like this and let me know what it says rlogit("WTF.. NAME LENGTH = %d, MAINLOOP COUNT = %d... AND [%d]\n", whatever, mainloop_count, ZEND_NUM_ARGS()); - Bob On Thu, 2004-01-08 at 13:41, Everton Luis Berz wrote: > result: > > WTF.. NAME LENGTH = 8, MAINLOOP COUNT = 136146712 > ** NUTS.. WE CRASHED > Quit (core dumped) > > > Bob Doan escreveu: > > Hi, > > > > In bindings/php/php.c > > > > You will see ZEND_FUNCTION(rlib_add_report) > > > > Can you add the rlogit line.. run your report.. crash.. but then look @ > > the apache log (or command line depending on how you did it).. > > and tell me what it says.. this looks like a PHP problem I think > > > > - Bob > > > > > > ZEND_FUNCTION(rlib_add_report) { > > zval *z_rip = NULL; > > int whatever, mainloop_count; > > char *name, *mainloop; > > rlib_inout_pass *rip; > > int id = -1; > > > > if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|s", &z_rip, > > &name, &whatever, &mainloop, &mainloop_count) == FAILURE) { > > return; > > } > > > > rlogit("WTF.. NAME LENGTH = %d, MAINLOOP COUNT = %d\n", whatever, > > mainloop_count); > > > > ZEND_FETCH_RESOURCE(rip, rlib_inout_pass *, &z_rip, id, LE_RLIB_NAME, > > le_link); > > > > if(mainloop_count > 0) > > rlib_add_report(rip->r, estrdup(name), estrdup(mainloop)); > > else > > rlib_add_report(rip->r, estrdup(name), NULL); > > > > } > > > > > > |
From: Everton L. B. <ev...@fa...> - 2004-01-09 12:34:57
|
hu.. i put the line and now my report works fine (except the log line at top..) the result is: WTF.. NAME LENGTH = 8, MAINLOOP COUNT = 16... AND [2] <head><style type="text/css">pre { margin:0; padding:0; margin-top:0; margin-bottom:0; font-size: 10pt;} DIV { position: absolute; left: 0; } TABLE { border: 0; cellspacing: 0; cellpadding: 0; width: 100%; } </style></head> <body><table><tr><td><pre><DIV><img src="../logo.jpg"></DIV> <font size="5" > </font><font size="5" >Rlib Sample Report</font> ..... Bob Doan escreveu: > Well... it seems like a php bug to me now... mainloop_count should be < > 0 since you didn't pass it in.. but I think we can work around it > > can you change the rlogit to something like this and let me know what it > says > > rlogit("WTF.. NAME LENGTH = %d, MAINLOOP COUNT = %d... AND [%d]\n", > whatever, mainloop_count, ZEND_NUM_ARGS()); > > > - Bob > > > On Thu, 2004-01-08 at 13:41, Everton Luis Berz wrote: > >>result: >> >>WTF.. NAME LENGTH = 8, MAINLOOP COUNT = 136146712 >>** NUTS.. WE CRASHED >>Quit (core dumped) >> >> >>Bob Doan escreveu: >> >>>Hi, >>> >>>In bindings/php/php.c >>> >>>You will see ZEND_FUNCTION(rlib_add_report) >>> >>>Can you add the rlogit line.. run your report.. crash.. but then look @ >>>the apache log (or command line depending on how you did it).. >>>and tell me what it says.. this looks like a PHP problem I think >>> >>>- Bob >>> >>> >>>ZEND_FUNCTION(rlib_add_report) { >>>zval *z_rip = NULL; >>>int whatever, mainloop_count; >>>char *name, *mainloop; >>>rlib_inout_pass *rip; >>>int id = -1; >>> >>>if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|s", &z_rip, >>>&name, &whatever, &mainloop, &mainloop_count) == FAILURE) { >>>return; >>>} >>> >>>rlogit("WTF.. NAME LENGTH = %d, MAINLOOP COUNT = %d\n", whatever, >>>mainloop_count); >>> >>>ZEND_FETCH_RESOURCE(rip, rlib_inout_pass *, &z_rip, id, LE_RLIB_NAME, >>>le_link); >>> >>>if(mainloop_count > 0) >>>rlib_add_report(rip->r, estrdup(name), estrdup(mainloop)); >>>else >>>rlib_add_report(rip->r, estrdup(name), NULL); >>> >>>} >>> >>> >> >> > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Perforce Software. > Perforce is the Fast Software Configuration Management System offering > advanced branching capabilities and atomic changes on 50+ platforms. > Free Eval! http://www.perforce.com/perforce/loadprog.html > _______________________________________________ > Rlib-users mailing list > Rli...@li... > https://lists.sourceforge.net/lists/listinfo/rlib-users > -- Everton Luis Berz Nucleo de Sistemas :: FACCAT - Faculdades de Taquara +55 51 541 6600 - R.624 ICQ 7807919 |
From: Bob D. <bd...@si...> - 2004-01-09 13:47:13
|
Well.. Um.... Odd This time it looks like you added a third paramater to rlib_add_report... did you?? perhaps try this.. might also work if(ZEND_NUM_ARGS() > 2) rlib_add_report(rip->r, estrdup(name), estrdup(mainloop)); else rlib_add_report(rip->r, estrdup(name), NULL); can you tell me if it does? (try taking the rlogit out also) - Bob On Fri, 2004-01-09 at 07:34, Everton Luis Berz wrote: > hu.. i put the line and now my report works fine (except the log line at > top..) > > the result is: > > WTF.. NAME LENGTH = 8, MAINLOOP COUNT = 16... AND [2] > <head><style type="text/css">pre { margin:0; padding:0; margin-top:0; > margin-bottom:0; font-size: 10pt;} > DIV { position: absolute; left: 0; } > TABLE { border: 0; cellspacing: 0; cellpadding: 0; width: 100%; } > </style></head> > <body><table><tr><td><pre><DIV><img src="../logo.jpg"></DIV> > <font size="5" > </font><font size="5" >Rlib Sample > Report</font> > ..... > > > > Bob Doan escreveu: > > Well... it seems like a php bug to me now... mainloop_count should be < > > 0 since you didn't pass it in.. but I think we can work around it > > > > can you change the rlogit to something like this and let me know what it > > says > > > > rlogit("WTF.. NAME LENGTH = %d, MAINLOOP COUNT = %d... AND [%d]\n", > > whatever, mainloop_count, ZEND_NUM_ARGS()); > > > > > > - Bob > > > > > > On Thu, 2004-01-08 at 13:41, Everton Luis Berz wrote: > > > >>result: > >> > >>WTF.. NAME LENGTH = 8, MAINLOOP COUNT = 136146712 > >>** NUTS.. WE CRASHED > >>Quit (core dumped) > >> > >> > >>Bob Doan escreveu: > >> > >>>Hi, > >>> > >>>In bindings/php/php.c > >>> > >>>You will see ZEND_FUNCTION(rlib_add_report) > >>> > >>>Can you add the rlogit line.. run your report.. crash.. but then look @ > >>>the apache log (or command line depending on how you did it).. > >>>and tell me what it says.. this looks like a PHP problem I think > >>> > >>>- Bob > >>> > >>> > >>>ZEND_FUNCTION(rlib_add_report) { > >>>zval *z_rip = NULL; > >>>int whatever, mainloop_count; > >>>char *name, *mainloop; > >>>rlib_inout_pass *rip; > >>>int id = -1; > >>> > >>>if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|s", &z_rip, > >>>&name, &whatever, &mainloop, &mainloop_count) == FAILURE) { > >>>return; > >>>} > >>> > >>>rlogit("WTF.. NAME LENGTH = %d, MAINLOOP COUNT = %d\n", whatever, > >>>mainloop_count); > >>> > >>>ZEND_FETCH_RESOURCE(rip, rlib_inout_pass *, &z_rip, id, LE_RLIB_NAME, > >>>le_link); > >>> > >>>if(mainloop_count > 0) > >>>rlib_add_report(rip->r, estrdup(name), estrdup(mainloop)); > >>>else > >>>rlib_add_report(rip->r, estrdup(name), NULL); > >>> > >>>} > >>> > >>> > >> > >> > > > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: Perforce Software. > > Perforce is the Fast Software Configuration Management System offering > > advanced branching capabilities and atomic changes on 50+ platforms. > > Free Eval! http://www.perforce.com/perforce/loadprog.html > > _______________________________________________ > > Rlib-users mailing list > > Rli...@li... > > https://lists.sourceforge.net/lists/listinfo/rlib-users > > > |
From: Everton L. B. <ev...@fa...> - 2004-01-09 14:03:08
|
I don't change nothing in my php source code, I keep rlib_add_report($rlib, "file.xml"). I remove the 'rlogit' and I put the "if(ZEND_NUM_ARGS() > 2)" code. It's works. Thanks. Bob Doan escreveu: > Well.. Um.... Odd > > This time it looks like you added a third paramater to > rlib_add_report... did you?? > > perhaps try this.. might also work > > if(ZEND_NUM_ARGS() > 2) > rlib_add_report(rip->r, estrdup(name), estrdup(mainloop)); > else > rlib_add_report(rip->r, estrdup(name), NULL); > > can you tell me if it does? (try taking the rlogit out also) > > - Bob > > > On Fri, 2004-01-09 at 07:34, Everton Luis Berz wrote: > >>hu.. i put the line and now my report works fine (except the log line at >>top..) >> >>the result is: >> >>WTF.. NAME LENGTH = 8, MAINLOOP COUNT = 16... AND [2] >><head><style type="text/css">pre { margin:0; padding:0; margin-top:0; >>margin-bottom:0; font-size: 10pt;} >>DIV { position: absolute; left: 0; } >>TABLE { border: 0; cellspacing: 0; cellpadding: 0; width: 100%; } >></style></head> >><body><table><tr><td><pre><DIV><img src="../logo.jpg"></DIV> >><font size="5" > </font><font size="5" >Rlib Sample >>Report</font> >>..... >> >> >> >>Bob Doan escreveu: >> >>>Well... it seems like a php bug to me now... mainloop_count should be < >>>0 since you didn't pass it in.. but I think we can work around it >>> >>>can you change the rlogit to something like this and let me know what it >>>says >>> >>> rlogit("WTF.. NAME LENGTH = %d, MAINLOOP COUNT = %d... AND [%d]\n", >>>whatever, mainloop_count, ZEND_NUM_ARGS()); >>> >>> >>>- Bob >>> >>> >>>On Thu, 2004-01-08 at 13:41, Everton Luis Berz wrote: >>> >>> >>>>result: >>>> >>>>WTF.. NAME LENGTH = 8, MAINLOOP COUNT = 136146712 >>>>** NUTS.. WE CRASHED >>>>Quit (core dumped) >>>> >>>> >>>>Bob Doan escreveu: >>>> >>>> >>>>>Hi, >>>>> >>>>>In bindings/php/php.c >>>>> >>>>>You will see ZEND_FUNCTION(rlib_add_report) >>>>> >>>>>Can you add the rlogit line.. run your report.. crash.. but then look @ >>>>>the apache log (or command line depending on how you did it).. >>>>>and tell me what it says.. this looks like a PHP problem I think >>>>> >>>>>- Bob >>>>> >>>>> >>>>>ZEND_FUNCTION(rlib_add_report) { >>>>>zval *z_rip = NULL; >>>>>int whatever, mainloop_count; >>>>>char *name, *mainloop; >>>>>rlib_inout_pass *rip; >>>>>int id = -1; >>>>> >>>>>if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|s", &z_rip, >>>>>&name, &whatever, &mainloop, &mainloop_count) == FAILURE) { >>>>>return; >>>>>} >>>>> >>>>>rlogit("WTF.. NAME LENGTH = %d, MAINLOOP COUNT = %d\n", whatever, >>>>>mainloop_count); >>>>> >>>>>ZEND_FETCH_RESOURCE(rip, rlib_inout_pass *, &z_rip, id, LE_RLIB_NAME, >>>>>le_link); >>>>> >>>>>if(mainloop_count > 0) >>>>>rlib_add_report(rip->r, estrdup(name), estrdup(mainloop)); >>>>>else >>>>>rlib_add_report(rip->r, estrdup(name), NULL); >>>>> >>>>>} >>>>> >>>>> >>>> >>>> >>> >>> >>>------------------------------------------------------- >>>This SF.net email is sponsored by: Perforce Software. >>>Perforce is the Fast Software Configuration Management System offering >>>advanced branching capabilities and atomic changes on 50+ platforms. >>>Free Eval! http://www.perforce.com/perforce/loadprog.html >>>_______________________________________________ >>>Rlib-users mailing list >>>Rli...@li... >>>https://lists.sourceforge.net/lists/listinfo/rlib-users >>> >> > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Perforce Software. > Perforce is the Fast Software Configuration Management System offering > advanced branching capabilities and atomic changes on 50+ platforms. > Free Eval! http://www.perforce.com/perforce/loadprog.html > _______________________________________________ > Rlib-users mailing list > Rli...@li... > https://lists.sourceforge.net/lists/listinfo/rlib-users > -- Everton Luis Berz Nucleo de Sistemas :: FACCAT - Faculdades de Taquara +55 51 541 6600 - R.624 ICQ 7807919 |