Hi *,
I installed the new version 1.2.2, but now the loading of modules fails when loading the domain module. With 1.2.1 everything worked fine.
Some more tests lead me to the conclusion that the problem is likely to be caused by accessing the database, since I commented out the domain module and I could even register a user which does not need to access the database (no authorization required), but when trying to register a user with digest authorization, it dies when accessing the database.
Symptons are: On the first database access, the process dies immediately, without further messages in /var/log/messages or elsewhere. Setting debug=9 doesn't help to gather more information.
Anyone else who can confirm this problem? Any ideas/solutions?
BTW: I'm using postgres, not mysql - just in case it matters...
Regards, Daniel
T-Mobile Deutschland GmbH Aufsichtsrat: Hamid Akhavan (Vorsitzender) Geschaftsfuhrung: Philipp Humm (Sprecher), Thomas Berlemann, Stefan Homeister, Holger Kranzusch, Gunther Ottendorfer, Dr. Raphael Kubler, Dr. Steffen Roehn Handelsregister: Amtsgericht Bonn, HRB 59 19 Sitz der Gesellschaft: Bonn WEEE-Reg.-Nr.: DE60800328
Hello,
On 08/17/07 15:16, Frey, Daniel (external) wrote:
Hi *,
I installed the new version 1.2.2, but now the loading of modules fails when loading the domain module. With 1.2.1 everything worked fine.
Some more tests lead me to the conclusion that the problem is likely to be caused by accessing the database, since I commented out the domain module and I could even register a user which does not need to access the database (no authorization required), but when trying to register a user with digest authorization, it dies when accessing the database.
Symptons are: On the first database access, the process dies immediately, without further messages in /var/log/messages or elsewhere. Setting debug=9 doesn't help to gather more information.
Anyone else who can confirm this problem? Any ideas/solutions?
how have you upgraded? via svn update or packages? can you do "ulimit -c unlimited" before starting openser in debug mode, maybe you are lucky to get a core.
Cheers, Daniel
BTW: I'm using postgres, not mysql - just in case it matters...
Regards, Daniel
T-Mobile Deutschland GmbH Aufsichtsrat: Hamid Akhavan (Vorsitzender) Geschaftsfuhrung: Philipp Humm (Sprecher), Thomas Berlemann, Stefan Homeister, Holger Kranzusch, Gunther Ottendorfer, Dr. Raphael Kubler, Dr. Steffen Roehn Handelsregister: Amtsgericht Bonn, HRB 59 19 Sitz der Gesellschaft: Bonn WEEE-Reg.-Nr.: DE60800328
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Hi Daniel,
I used the packages to update. ulimit -c unlimited doesn't help, since the program doesn't crash - it simply returns normally (I ran it in ddd) and hence writes no core file I could use...
If it helps: The program is calling exit(0) from daemonize.c:111 (according to ddd).
Regards, Daniel
T-Mobile Deutschland GmbH Aufsichtsrat: Hamid Akhavan (Vorsitzender) Geschäftsführung: Philipp Humm (Sprecher), Thomas Berlemann, Stefan Homeister, Holger Kranzusch, Günther Ottendorfer, Dr. Raphael Kübler, Dr. Steffen Roehn Handelsregister: Amtsgericht Bonn, HRB 59 19 Sitz der Gesellschaft: Bonn WEEE-Reg.-Nr.: DE60800328
Von: Daniel-Constantin Mierla [mailto:daniel@voice-system.ro] Gesendet: Freitag, 17. August 2007 15:20 An: Frey, Daniel (external) Cc: users@openser.org Betreff: Re: [OpenSER-Users] OpenSER 1.2.2 - Problem with database (postgres?)
Hello, On 08/17/07 15:16, Frey, Daniel (external) wrote: > Hi *, > > I installed the new version 1.2.2, but now the loading of modules fails > when loading the domain module. With 1.2.1 everything worked fine. > > Some more tests lead me to the conclusion that the problem is likely to > be caused by accessing the database, since I commented out the domain > module and I could even register a user which does not need to access > the database (no authorization required), but when trying to register a > user with digest authorization, it dies when accessing the database. > > Symptons are: On the first database access, the process dies > immediately, without further messages in /var/log/messages or elsewhere. > Setting debug=9 doesn't help to gather more information. > > Anyone else who can confirm this problem? Any ideas/solutions? > how have you upgraded? via svn update or packages? can you do "ulimit -c unlimited" before starting openser in debug mode, maybe you are lucky to get a core. Cheers, Daniel > BTW: I'm using postgres, not mysql - just in case it matters... > > Regards, Daniel > > > T-Mobile Deutschland GmbH > Aufsichtsrat: Hamid Akhavan (Vorsitzender) > Geschaftsfuhrung: Philipp Humm (Sprecher), Thomas Berlemann, Stefan Homeister, Holger Kranzusch, Gunther Ottendorfer, Dr. Raphael Kubler, Dr. Steffen Roehn > Handelsregister: Amtsgericht Bonn, HRB 59 19 > Sitz der Gesellschaft: Bonn > WEEE-Reg.-Nr.: DE60800328 > > _______________________________________________ > Users mailing list > Users@openser.org > http://openser.org/cgi-bin/mailman/listinfo/users > >
Hi Daniel,
a further analysis shows that db/db.c table_version() is causing dbf->free_result() to be called - but it never returns. In fact, the version of the database table is retrieved correctly (line 211 reads the correct value), but line 212 never returns. Checking modules/postgres/db_res.c, I found that pg_free_result() calls pg_free_columns() in line 653 (which returns), and then it calls pg_free_rows() which does not return.
Also, I noticed that there's a warning during the compilation about db_res.c:580: warning: '_val' is used uninitialized in this function
Looks like a candidate - but I'm not familiar with the internals here...
Regards, Daniel
T-Mobile Deutschland GmbH Aufsichtsrat: Hamid Akhavan (Vorsitzender) Geschaftsfuhrung: Philipp Humm (Sprecher), Thomas Berlemann, Stefan Homeister, Holger Kranzusch, Gunther Ottendorfer, Dr. Raphael Kubler, Dr. Steffen Roehn Handelsregister: Amtsgericht Bonn, HRB 59 19 Sitz der Gesellschaft: Bonn WEEE-Reg.-Nr.: DE60800328
Me again :)
..though I'm not an expert, I decided to simply guess the code :))
Adding
_val = &(ROW_VALUES(_row)[col]);
before the switch statement fixes the bug for me. The line number 580 I gave was wrong because of some debug code I added. The line where _val = ... is added is 575. Please confirm if this is the correct fix or just works by accident :) Thanks.
Regards, Daniel
T-Mobile Deutschland GmbH Aufsichtsrat: Hamid Akhavan (Vorsitzender) Geschäftsführung: Philipp Humm (Sprecher), Thomas Berlemann, Stefan Homeister, Holger Kranzusch, Günther Ottendorfer, Dr. Raphael Kübler, Dr. Steffen Roehn Handelsregister: Amtsgericht Bonn, HRB 59 19 Sitz der Gesellschaft: Bonn WEEE-Reg.-Nr.: DE60800328
Von: users-bounces@openser.org [mailto:users-bounces@openser.org] Im Auftrag von Frey, Daniel (external) Gesendet: Freitag, 17. August 2007 16:46 An: daniel@voice-system.ro Cc: users@openser.org Betreff: AW: [OpenSER-Users] OpenSER 1.2.2 - Problem with database (postgres?) Hi Daniel, a further analysis shows that db/db.c table_version() is causing dbf->free_result() to be called - but it never returns. In fact, the version of the database table is retrieved correctly (line 211 reads the correct value), but line 212 never returns. Checking modules/postgres/db_res.c, I found that pg_free_result() calls pg_free_columns() in line 653 (which returns), and then it calls pg_free_rows() which does not return. Also, I noticed that there's a warning during the compilation about db_res.c:580: warning: '_val' is used uninitialized in this function Looks like a candidate - but I'm not familiar with the internals here... Regards, Daniel
T-Mobile Deutschland GmbH Aufsichtsrat: Hamid Akhavan (Vorsitzender) Geschäftsführung: Philipp Humm (Sprecher), Thomas Berlemann, Stefan Homeister, Holger Kranzusch, Günther Ottendorfer, Dr. Raphael Kübler, Dr. Steffen Roehn Handelsregister: Amtsgericht Bonn, HRB 59 19 Sitz der Gesellschaft: Bonn WEEE-Reg.-Nr.: DE60800328
Hi Daniel,
Just took a look at the latest SVN code and it appears the section you are referring to is listed below. Indeed, _val is being set to the address of the location of the value of the particular [row][col]. If you are referring to another location of the code, please respond accordingly.
<snip> /* * Loop thru each columm, then check to determine if the storage * pointed to by db_val_t structure must be freed. * This is required for all data types which use a pointer to a buffer * like DB_STRING, DB_STR and DB_BLOB. * If this is not done, a memory leak will happen. */ for (col = 0; col < ROW_N(_row); col++) { _val = &(ROW_VALUES(_row)[col]); switch (VAL_TYPE(_val)) { case DB_STRING: </snip>
Regards, Norm
Frey, Daniel (external) wrote:
Me again :) ..though I'm not an expert, I decided to simply guess the code :)) Adding _val = &(ROW_VALUES(_row)[col]); before the switch statement fixes the bug for me. The line number 580 I gave was wrong because of some debug code I added. The line where _val = ... is added is 575. Please confirm if this is the correct fix or just works by accident :) Thanks. Regards, Daniel
T-Mobile Deutschland GmbH Aufsichtsrat: Hamid Akhavan (Vorsitzender) Geschäftsführung: Philipp Humm (Sprecher), Thomas Berlemann, Stefan Homeister, Holger Kranzusch, Günther Ottendorfer, Dr. Raphael Kübler, Dr. Steffen Roehn Handelsregister: Amtsgericht Bonn, HRB 59 19 Sitz der Gesellschaft: Bonn WEEE-Reg.-Nr.: DE60800328
-----Ursprüngliche Nachricht----- *Von:* users-bounces@openser.org [mailto:users-bounces@openser.org] *Im Auftrag von *Frey, Daniel (external) *Gesendet:* Freitag, 17. August 2007 16:46 *An:* daniel@voice-system.ro *Cc:* users@openser.org *Betreff:* AW: [OpenSER-Users] OpenSER 1.2.2 - Problem with database (postgres?) Hi Daniel, a further analysis shows that db/db.c table_version() is causing dbf->free_result() to be called - but it never returns. In fact, the version of the database table is retrieved correctly (line 211 reads the correct value), but line 212 never returns. Checking modules/postgres/db_res.c, I found that pg_free_result() calls pg_free_columns() in line 653 (which returns), and then it calls pg_free_rows() which does not return. Also, I noticed that there's a warning during the compilation about db_res.c:580: warning: ‘_val’ is used uninitialized in this function Looks like a candidate - but I'm not familiar with the internals here... Regards, Daniel T-Mobile Deutschland GmbH Aufsichtsrat: Hamid Akhavan (Vorsitzender) Geschäftsführung: Philipp Humm (Sprecher), Thomas Berlemann, Stefan Homeister, Holger Kranzusch, Günther Ottendorfer, Dr. Raphael Kübler, Dr. Steffen Roehn Handelsregister: Amtsgericht Bonn, HRB 59 19 Sitz der Gesellschaft: Bonn WEEE-Reg.-Nr.: DE60800328
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
What about line 575 here: http://openser.svn.sourceforge.net/viewvc/openser/branches/1.2/modules/postg...
Is _val initialized correctly?
In this line, _val is used although it was never initialized - which is the bug itself. The solution is, as the Norman mentioned, the version from the trunk.
Regards, Daniel
T-Mobile Deutschland GmbH Aufsichtsrat: Hamid Akhavan (Vorsitzender) Geschäftsführung: Philipp Humm (Sprecher), Thomas Berlemann, Stefan Homeister, Holger Kranzusch, Günther Ottendorfer, Dr. Raphael Kübler, Dr. Steffen Roehn Handelsregister: Amtsgericht Bonn, HRB 59 19 Sitz der Gesellschaft: Bonn WEEE-Reg.-Nr.: DE60800328
Von: Will Quan [mailto:sip@voiplabs.net] Gesendet: Sonntag, 19. August 2007 03:12 An: Norman Brandinger; Frey, Daniel (external) Cc: users@openser.org Betreff: [*** Spam ***] RE: AW: [OpenSER-Users] OpenSER 1.2.2 - Problem with database(postgres?)
What about line 575 here: http://openser.svn.sourceforge.net/viewvc/openser/branches/1.2/modules/postg... Is _val initialized correctly?
Hello,
the fix was just committed. Thanks,
Daniel
On 08/20/07 10:35, Frey, Daniel (external) wrote:
In this line, _val is used although it was never initialized - which is the bug itself. The solution is, as the Norman mentioned, the version from the trunk.
Regards, Daniel
T-Mobile Deutschland GmbH Aufsichtsrat: Hamid Akhavan (Vorsitzender) Geschäftsführung: Philipp Humm (Sprecher), Thomas Berlemann, Stefan Homeister, Holger Kranzusch, Günther Ottendorfer, Dr. Raphael Kübler, Dr. Steffen Roehn Handelsregister: Amtsgericht Bonn, HRB 59 19 Sitz der Gesellschaft: Bonn WEEE-Reg.-Nr.: DE60800328
-----Ursprüngliche Nachricht----- *Von:* Will Quan [mailto:sip@voiplabs.net] *Gesendet:* Sonntag, 19. August 2007 03:12 *An:* Norman Brandinger; Frey, Daniel (external) *Cc:* users@openser.org *Betreff:* [*** Spam ***] RE: AW: [OpenSER-Users] OpenSER 1.2.2 - Problem with database(postgres?) What about line 575 here: http://openser.svn.sourceforge.net/viewvc/openser/branches/1.2/modules/postgres/db_res.c?revision=2470&view=markup <http://openser.svn.sourceforge.net/viewvc/openser/branches/1.2/modules/postgres/db_res.c?revision=2470&view=markup> Is _val initialized correctly?
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users