Re: [OpenSIPS-Users] opensips crash with location data

2014-06-12 Thread Bogdan-Andrei Iancu

Hi Pasan,

Glad the problem was fixed.

Most of the modules rely on the fact the DB schema is correct and all 
columns have the correct type. So, they do not actually check that - 
just a few are doing.
Probably it will be a good practice to have all of them doing that kind 
of checks. I will add that on the TODO list :).


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 12.06.2014 06:53, Pasan Meemaduma wrote:


Hi Bogdan.

I can confirm the opensips crash stopped after I used the correct 
schema. Is it possible to add better erorr handling to such situation 
? or is it a overhead ?


On Wednesday, 11 June 2014, 7:46, Pasan Meemaduma pasan...@ymail.com 
wrote:






Hi Bogdan,

appologies for my late reply. I got problem with accessing my email 
account from home. :(


Thanks for the help in spotting the mistake I did :'(. I'll fix the 
location table and see how it goes. :)




On Friday, 6 June 2014, 16:58, Bogdan-Andrei Iancu 
bog...@opensips.org wrote:



no, it is not related to that :) - see my previous email.

Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com  http://www.opensips-solutions.com/


___
Users mailing list
Users@lists.opensips.org mailto:Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users




___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] opensips crash with location data

2014-06-12 Thread Pasan Meemaduma
Hi Bogdan,

appologies for my late reply. I got problem with accessing my email account 
from home. :(

Thanks for the help in spotting the mistake I did :'(. I'll fix the location 
table and see how it goes. :)




On Friday, 6 June 2014, 16:58, Bogdan-Andrei Iancu bog...@opensips.org wrote:
 


no, it is not related to that :) - see my previous email.

Regards,
 
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer http://www.opensips-solutions.com
On 06.06.2014 06:35, Pasan Meemaduma wrote:

Hi Bogdan,


I just found that I have got the key constraint wrong. Will that be the issue ?


| location | CREATE TABLE `location` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `username` char(64) NOT NULL DEFAULT '',
  `domain` char(64) DEFAULT NULL,
  `contact` char(255) NOT NULL DEFAULT '',
  `received` char(128) DEFAULT NULL,
  `path` char(128) DEFAULT NULL,
  `expires` datetime NOT NULL DEFAULT '2020-05-28 21:32:15',
  `q` float(10,2) NOT NULL DEFAULT '1.00',
  `callid` char(255) NOT NULL DEFAULT 'Default-Call-ID',
  `cseq` int(11) NOT NULL DEFAULT '13',
  `last_modified` datetime NOT NULL DEFAULT '1900-01-01
00:00:01',
  `flags` int(11) NOT NULL DEFAULT '0',
  `cflags` int(11) NOT NULL DEFAULT '0',
  `user_agent` char(255) NOT NULL DEFAULT '',
  `socket` char(64) DEFAULT NULL,
  `methods` int(11) DEFAULT NULL,
  `sip_instance` char(255) DEFAULT NULL,
  `attr` char(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `account_contact_idx` (`username`,`domain`,`contact`)
) ENGINE=MyISAM AUTO_INCREMENT=25375081 DEFAULT
CHARSET=latin1 |



account_contact_idx is missing callid column. Will this has any relation to 
crash ?




On Friday, 6 June 2014, 8:48, Pasan Meemaduma pasan...@ymail.com wrote:
 


Hi Bogdan,


Thanks for the reply. I created the table using normal schema it looks fine to 
me. I was refering to the old url you gave me. There in that table attr was 
missing :)


this is the url missing attr in location table
http://www.opensips.org/Documentation/Install-DBSchema-1-10#AEN7254  


below is my table schema,

mysql desc location;
+---+--+--+-+-++
| Field | Type | Null |
  Key | Default | Extra  |
+---+--+--+-+-++
| id    | int(10) unsigned | NO   |
  PRI | NULL    | auto_increment |
| username  | char(64) | NO   |
  MUL | |    |
| domain    | char(64) | YES 
  | | NULL    |    |
| contact   | char(255)    | NO  
  | | |    |
| received  | char(128)    | YES 
  | | NULL    |    |
| path  | char(128)    | YES 
  | | NULL    |    |
| expires   | datetime | NO  
  | | 2020-05-28 21:32:15 |    |
| q | float(10,2)  | NO  
  | | 1.00    |    |
| callid    | char(255)    | NO  
  | | Default-Call-ID |    |
| cseq  | int(11)  | NO  
  | | 13  |    |
| last_modified | datetime | NO  
  | | 1900-01-01 00:00:01 |    |
| flags | int(11)  | NO  
  | | 0   |    |
| cflags    | int(11)  | NO  
  | | 0   |    |
| user_agent    | char(255)    | NO  
  | | |    |
| socket    | char(64) | YES 
  | | NULL    |    |
| methods   | int(11)  | YES 
  | | NULL    |    |
| sip_instance  | char(255)    | YES 
  | | NULL    |    |
| attr  | char(255)    | YES 
  | | NULL    |    |
+---+--+--+-+-++


attr holds NULL values for all entries.

do I have to run below in gdb after running bt
  full right ?

this is what i got

(gdb) f 1
#1  0x7f64823a60a2 in dbrow2info
  (contact=0x7fffe0246180, vals=0x7f648287a260)
  at udomain.c:306
306    in udomain.c
(gdb) p (vals+6)-val.string_val
$2 = 0x0
(gdb) 


-without running bt full
  

Re: [OpenSIPS-Users] opensips crash with location data

2014-06-12 Thread Pasan Meemaduma
Hi Bogdan,

Awesome :) . Thanks for all the help. I still can't believe I just missed that 
change. :(. I took care of lot of things when I migrate the script from 1.5 - 
1.10.



On Thursday, 12 June 2014, 17:06, Bogdan-Andrei Iancu bog...@opensips.org 
wrote:
 


Hi Pasan,

Glad the problem was fixed.

Most of the modules rely on the fact the DB schema is correct
and all columns have the correct type. So, they do not actually
check that - just a few are doing.
Probably it will be a good practice to have all of them doing
that kind of checks. I will add that on the TODO list :).

Regards,
 
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer http://www.opensips-solutions.com___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] opensips crash with location data

2014-06-11 Thread Pasan Meemaduma


Hi Bogdan.

I can confirm the opensips crash stopped after I used the correct schema. Is it 
possible to add better erorr handling to such situation ? or is it a overhead ? 


On Wednesday, 11 June 2014, 7:46, Pasan Meemaduma pasan...@ymail.com wrote:
 






Hi Bogdan,


appologies for my late reply. I got problem with accessing my email account 
from home. :(

Thanks for the help in spotting the mistake I did :'(. I'll fix the location 
table and see how it goes. :)



On Friday, 6 June 2014, 16:58, Bogdan-Andrei Iancu bog...@opensips.org wrote:
 


no, it is not related to that :) - see my previous email.

Regards,
 
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer http://www.opensips-solutions.com


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] opensips crash with location data

2014-06-10 Thread Pasan Meemaduma




Hi Bogdan,


appologies for my late reply. I got problem with accessing my email account 
from home. :(

Thanks for the help in spotting the mistake I did :'(. I'll fix the location 
table and see how it goes. :)



On Friday, 6 June 2014, 16:58, Bogdan-Andrei Iancu bog...@opensips.org wrote:
 


no, it is not related to that :) - see my previous email.

Regards,
 
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer http://www.opensips-solutions.com
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] opensips crash with location data

2014-06-06 Thread Bogdan-Andrei Iancu

Hi Pasan,

OK, the online docs were fixed, thank for the notice.

The backtrace points to the cflags field - this was changed from int 
to string - and you did not made the correct change in your table 
definition. This causes the crash.


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 06.06.2014 06:18, Pasan Meemaduma wrote:

Hi Bogdan,

Thanks for the reply. I created the table using normal schema it looks 
fine to me. I was refering to the old url you gave me. There in that 
table attr was missing :)


this is the url missing attr in location table
http://www.opensips.org/Documentation/Install-DBSchema-1-10#AEN7254


below is my table schema,

mysql desc location;
+---+--+--+-+-++
| Field | Type | Null | Key | Default 
| Extra  |

+---+--+--+-+-++
| id| int(10) unsigned | NO   | PRI | NULL
| auto_increment |
| username  | char(64) | NO   | MUL | 
||
| domain| char(64) | YES  | | NULL
||
| contact   | char(255)| NO   | | 
||
| received  | char(128)| YES  | | NULL
||
| path  | char(128)| YES  | | NULL
||
| expires   | datetime | NO   | | 2020-05-28 21:32:15 
||
| q | float(10,2)  | NO   | | 1.00
||
| callid| char(255)| NO   | | Default-Call-ID 
||
| cseq  | int(11)  | NO   | | 13  
||
| last_modified | datetime | NO   | | 1900-01-01 00:00:01 
||
| flags | int(11)  | NO   | | 0   
||
| cflags| int(11)  | NO   | | 0   
||
| user_agent| char(255)| NO   | | 
||
| socket| char(64) | YES  | | NULL
||
| methods   | int(11)  | YES  | | NULL
||
| sip_instance  | char(255)| YES  | | NULL
||
| attr  | char(255)| YES  | | NULL
||

+---+--+--+-+-++


attr holds NULL values for all entries.

do I have to run below in gdb after running bt full right ?

this is what i got

(gdb) f 1
#1  0x7f64823a60a2 in dbrow2info (contact=0x7fffe0246180, 
vals=0x7f648287a260) at udomain.c:306

306in udomain.c
(gdb) p (vals+6)-val.string_val
$2 = 0x0
(gdb)


-without running bt full - just in case :)
(gdb) f 1
#1  0x7f64823a60a2 in dbrow2info (contact=0x7fffe0246180, 
vals=0x7f648287a260) at udomain.c:306

306udomain.c: No such file or directory.
(gdb) p (vals+6)-val.string_val
$1 = 0x0






___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] opensips crash with location data

2014-06-06 Thread Bogdan-Andrei Iancu

no, it is not related to that :) - see my previous email.

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 06.06.2014 06:35, Pasan Meemaduma wrote:

Hi Bogdan,

I just found that I have got the key constraint wrong. Will that be 
the issue ?


| location | CREATE TABLE `location` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `username` char(64) NOT NULL DEFAULT '',
  `domain` char(64) DEFAULT NULL,
  `contact` char(255) NOT NULL DEFAULT '',
  `received` char(128) DEFAULT NULL,
  `path` char(128) DEFAULT NULL,
  `expires` datetime NOT NULL DEFAULT '2020-05-28 21:32:15',
  `q` float(10,2) NOT NULL DEFAULT '1.00',
  `callid` char(255) NOT NULL DEFAULT 'Default-Call-ID',
  `cseq` int(11) NOT NULL DEFAULT '13',
  `last_modified` datetime NOT NULL DEFAULT '1900-01-01 00:00:01',
  `flags` int(11) NOT NULL DEFAULT '0',
  `cflags` int(11) NOT NULL DEFAULT '0',
  `user_agent` char(255) NOT NULL DEFAULT '',
  `socket` char(64) DEFAULT NULL,
  `methods` int(11) DEFAULT NULL,
  `sip_instance` char(255) DEFAULT NULL,
  `attr` char(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `account_contact_idx` (`username`,`domain`,`contact`)
) ENGINE=MyISAM AUTO_INCREMENT=25375081 DEFAULT CHARSET=latin1 |

account_contact_idx is missing callid column. Will this has any 
relation to crash ?



On Friday, 6 June 2014, 8:48, Pasan Meemaduma pasan...@ymail.com wrote:


Hi Bogdan,

Thanks for the reply. I created the table using normal schema it looks 
fine to me. I was refering to the old url you gave me. There in that 
table attr was missing :)


this is the url missing attr in location table
http://www.opensips.org/Documentation/Install-DBSchema-1-10#AEN7254


below is my table schema,

mysql desc location;
+---+--+--+-+-++
| Field | Type | Null | Key | Default 
| Extra  |

+---+--+--+-+-++
| id| int(10) unsigned | NO   | PRI | NULL
| auto_increment |
| username  | char(64) | NO   | MUL | 
||
| domain| char(64) | YES | | NULL
||
| contact   | char(255)| NO | | 
||
| received  | char(128)| YES | | NULL
||
| path  | char(128)| YES | | NULL
||
| expires   | datetime | NO | | 2020-05-28 21:32:15 
||
| q | float(10,2)  | NO | | 1.00
||
| callid| char(255)| NO | | Default-Call-ID 
||
| cseq  | int(11)  | NO | | 13  
||
| last_modified | datetime | NO | | 1900-01-01 00:00:01 
||
| flags | int(11)  | NO | | 0   
||
| cflags| int(11)  | NO | | 0   
||
| user_agent| char(255)| NO | | 
||
| socket| char(64) | YES | | NULL
||
| methods   | int(11)  | YES | | NULL
||
| sip_instance  | char(255)| YES | | NULL
||
| attr  | char(255)| YES | | NULL
||

+---+--+--+-+-++


attr holds NULL values for all entries.

do I have to run below in gdb after running bt full right ?

this is what i got

(gdb) f 1
#1  0x7f64823a60a2 in dbrow2info (contact=0x7fffe0246180, 
vals=0x7f648287a260) at udomain.c:306

306in udomain.c
(gdb) p (vals+6)-val.string_val
$2 = 0x0
(gdb)


-without running bt full - just in case :)
(gdb) f 1
#1  0x7f64823a60a2 in dbrow2info (contact=0x7fffe0246180, 
vals=0x7f648287a260) at udomain.c:306

306udomain.c: No such file or directory.
(gdb) p (vals+6)-val.string_val
$1 = 0x0



On Thursday, 5 June 2014, 17:07, Bogdan-Andrei Iancu 
bog...@opensips.org wrote:



Thanks for the backtrace. In DB, what do you have for the attr value 
? NULL or an empty string ?


In gdb, could you do:
f 1
p (vals+6)-val.string_val

Thanks,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com  http://www.opensips-solutions.com/
On 05.06.2014 06:15, Pasan Meemaduma wrote:


oops sorry I forgot opensips-dbg :) bt reattached.

I have change some sensitive values with 'x' as below, hope it wont 
affect u r investigations


contact = {s = 0xf91eab sip:xxx...@xxx.xxx.xxx.xx 
mailto:sip:xxx...@xxx.xxx.xxx.xx, len = 29}



On Thursday, 5 

Re: [OpenSIPS-Users] opensips crash with location data

2014-06-05 Thread Bogdan-Andrei Iancu
Thanks for the backtrace. In DB, what do you have for the attr value ? 
NULL or an empty string ?


In gdb, could you do:
f 1
p (vals+6)-val.string_val

Thanks,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 05.06.2014 06:15, Pasan Meemaduma wrote:

oops sorry I forgot opensips-dbg :) bt reattached.

I have change some sensitive values with 'x' as below, hope it wont 
affect u r investigations


contact = {s = 0xf91eab sip:xxx...@xxx.xxx.xxx.xx, len = 29}


On Thursday, 5 June 2014, 8:34, Pasan Meemaduma pasan...@ymail.com 
wrote:



Hi Bogdan,

I double checked the schema and it is correct. btw doc needs fixing 
its missing attr column which is needed by 1.10 for location table 
otherwise I'll get below error.


Jun 5 12:57:26  x/usr/sbin/opensips[30176]: 
CRITICAL:db_mysql:wrapper_single_mysql_real_query: driver error 
(1054): Unknown column 'attr' in 'field list'
Jun  5 12:57:26 x /usr/sbin/opensips[30177]: DBG:core:db_do_init: 
connection 0x7f4dc04c1c28 inserted in pool as 0x7f4dc04c1d30
Jun  5 12:57:26 x /usr/sbin/opensips[30176]: ERROR:core:db_do_query: 
error while submitting query - [select 
username,contact,expires,q,callid,cseq,flags,cflags,user_agent,received,path,socket,methods,last_modified,sip_instance,attr 
from location ]
Jun  5 12:57:26 anacardium3backup /usr/sbin/opensips[30176]: 
ERROR:usrloc:preload_udomain: db_query (1) failed


:)

I got the backtrace as you requested , It doesn't seems right to me. 
does it make any sense ? or did I miss something getting it ?






___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] opensips crash with location data

2014-06-05 Thread Pasan Meemaduma
oops sorry I forgot opensips-dbg :) bt reattached.

I have change some sensitive values with 'x' as below, hope it wont affect u r 
investigations

    contact = {s = 0xf91eab sip:xxx...@xxx.xxx.xxx.xx, len = 29}



On Thursday, 5 June 2014, 8:34, Pasan Meemaduma pasan...@ymail.com wrote:
 


Hi Bogdan,

I double checked the schema and it is correct. btw doc needs fixing its missing 
attr column which is needed by 1.10 for location table otherwise I'll get below 
error.

Jun  5 12:57:26  x/usr/sbin/opensips[30176]: 
CRITICAL:db_mysql:wrapper_single_mysql_real_query: driver error (1054): Unknown 
column 'attr' in 'field list'
Jun  5 12:57:26 x /usr/sbin/opensips[30177]: DBG:core:db_do_init: connection 
0x7f4dc04c1c28 inserted in pool as 0x7f4dc04c1d30
Jun  5 12:57:26 x /usr/sbin/opensips[30176]: ERROR:core:db_do_query: error 
while submitting query - [select 
username,contact,expires,q,callid,cseq,flags,cflags,user_agent,received,path,socket,methods,last_modified,sip_instance,attr
 from location ]
Jun  5 12:57:26 anacardium3backup /usr/sbin/opensips[30176]: 
ERROR:usrloc:preload_udomain: db_query (1) failed


:)


I got the backtrace as you requested , It doesn't seems right to me.  does it 
make any sense ? or did I miss something getting it ?


gdb opensips core.opensips.sig11.29154
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by
 law.  Type show copying
and show warranty for details.
This GDB was configured as x86_64-linux-gnu.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /usr/sbin/opensips...(no debugging symbols found)...done.
[New LWP 29154]

warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library /lib/x86_64-linux-gnu/libthread_db.so.1.

warning: no loadable sections found in added symbol-file system-supplied DSO at 
0x779fe000
Core was generated by `/usr/sbin/opensips -P /var/run/opensips/opensips.pid -m 
512 -M 16 -u opensips -'.
Program terminated with signal 11, Segmentation fault.
#0  0x7f3a71ab4f21 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt full
#0  0x7f3a71ab4f21 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#1  0x7f3a703b50a2 in preload_udomain () from 
/usr/lib/opensips/modules/usrloc.so
No symbol table info available.
#2  0x7f3a703b8fb6 in ?? () from /usr/lib/opensips/modules/usrloc.so
No symbol table info available.
#3  0x0047c617 in ?? ()
No symbol table info available.
#4  0x0047c4e7 in ?? ()
No symbol table info available.
#5  0x0047c4e7 in ?? ()
No symbol table info available.
#6  0x0047c4e7 in ?? ()
No symbol table info available.
#7  0x0047c4e7 in ?? ()
No symbol table info available.
#8  0x0047c4e7 in ?? ()
No symbol table info available.
#9  0x0047c4e7 in ?? ()
No symbol table info available.
#10 0x0047c4e7 in ?? ()
No symbol table info available.
#11 0x0047c4e7 in ?? ()
No symbol table info available.
#12 0x0047c4e7 in ?? ()
No symbol table info available.
#13 0x0047c4e7 in ?? ()
No symbol table info available.
#14 0x0047c4e7 in ?? ()
No symbol table info available.
#15 0x0047c4e7 in ?? ()
No symbol table info available.
#16 0x0047c4e7 in ?? ()
No symbol table info available.
#17 0x0047c4e7 in ?? ()
No symbol table info available.
#18 0x0047c4e7 in ?? ()
No symbol table info available.
#19 0x0047c4e7 in ?? ()
No symbol table info available.
#20 0x0047c4e7 in ?? ()
No symbol table info available.
#21 0x0047c4e7 in ?? ()
No symbol table info available.
#22 0x0047c4e7 in ?? ()
No symbol table info available.
---Type return to continue, or q
 return to quit---
#23 0x0047c4e7 in ?? ()
No symbol table info available.
#24 0x0047c4e7 in ?? ()
No symbol table info available.
#25 0x0047c4e7 in ?? ()
No symbol table info available.
#26 0x0047c4e7 in ?? ()
No symbol table info available.
#27 0x0047c4e7 in ?? ()
No symbol table info available.
#28 0x0047c4e7 in ?? ()
No symbol table info available.
#29 0x004186be in main ()
No symbol table info available.




On Wednesday, 4 June 2014, 17:49, Bogdan-Andrei Iancu bog...@opensips.org 
wrote:
 


Hi Pasan,

Please be sure you are using the DB schema for 1.11 (see 
http://www.opensips.org/Documentation/Install-DBSchema-1-10#AEN7254 ) - check 
the DB types and the content.

Also, follow this tutorial 
http://www.opensips.org/Documentation/TroubleShooting-Crash in order to extract 
and post here the backtrace of your crash.

Regards,
 
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer 

Re: [OpenSIPS-Users] opensips crash with location data

2014-06-05 Thread Bogdan-Andrei Iancu

Hi Pasan,

The schema is correct (see 
https://github.com/OpenSIPS/opensips/blob/1.10/scripts/mysql/usrloc-create.sql) 
- it contain the attr field. How did you created the location table 
for 1.10 ??


about the crash - looking into the bt in the next email.

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 05.06.2014 06:03, Pasan Meemaduma wrote:

Hi Bogdan,

I double checked the schema and it is correct. btw doc needs fixing 
its missing attr column which is needed by 1.10 for location table 
otherwise I'll get below error.


Jun  5 12:57:26  x/usr/sbin/opensips[30176]: 
CRITICAL:db_mysql:wrapper_single_mysql_real_query: driver error 
(1054): Unknown column 'attr' in 'field list'
Jun  5 12:57:26 x /usr/sbin/opensips[30177]: DBG:core:db_do_init: 
connection 0x7f4dc04c1c28 inserted in pool as 0x7f4dc04c1d30
Jun  5 12:57:26 x /usr/sbin/opensips[30176]: ERROR:core:db_do_query: 
error while submitting query - [select 
username,contact,expires,q,callid,cseq,flags,cflags,user_agent,received,path,socket,methods,last_modified,sip_instance,attr 
from location ]
Jun  5 12:57:26 anacardium3backup /usr/sbin/opensips[30176]: 
ERROR:usrloc:preload_udomain: db_query (1) failed


:)

I got the backtrace as you requested , It doesn't seems right to me.  
does it make any sense ? or did I miss something getting it ?



gdb opensips core.opensips.sig11.29154
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
http://gnu.org/licenses/gpl.html

This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type show copying
and show warranty for details.
This GDB was configured as x86_64-linux-gnu.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /usr/sbin/opensips...(no debugging symbols 
found)...done.

[New LWP 29154]

warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library /lib/x86_64-linux-gnu/libthread_db.so.1.

warning: no loadable sections found in added symbol-file 
system-supplied DSO at 0x779fe000
Core was generated by `/usr/sbin/opensips -P 
/var/run/opensips/opensips.pid -m 512 -M 16 -u opensips -'.

Program terminated with signal 11, Segmentation fault.
#0  0x7f3a71ab4f21 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt full
#0  0x7f3a71ab4f21 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#1  0x7f3a703b50a2 in preload_udomain () from 
/usr/lib/opensips/modules/usrloc.so

No symbol table info available.
#2  0x7f3a703b8fb6 in ?? () from /usr/lib/opensips/modules/usrloc.so
No symbol table info available.
#3  0x0047c617 in ?? ()
No symbol table info available.
#4  0x0047c4e7 in ?? ()
No symbol table info available.
#5  0x0047c4e7 in ?? ()
No symbol table info available.
#6  0x0047c4e7 in ?? ()
No symbol table info available.
#7  0x0047c4e7 in ?? ()
No symbol table info available.
#8  0x0047c4e7 in ?? ()
No symbol table info available.
#9  0x0047c4e7 in ?? ()
No symbol table info available.
#10 0x0047c4e7 in ?? ()
No symbol table info available.
#11 0x0047c4e7 in ?? ()
No symbol table info available.
#12 0x0047c4e7 in ?? ()
No symbol table info available.
#13 0x0047c4e7 in ?? ()
No symbol table info available.
#14 0x0047c4e7 in ?? ()
No symbol table info available.
#15 0x0047c4e7 in ?? ()
No symbol table info available.
#16 0x0047c4e7 in ?? ()
No symbol table info available.
#17 0x0047c4e7 in ?? ()
No symbol table info available.
#18 0x0047c4e7 in ?? ()
No symbol table info available.
#19 0x0047c4e7 in ?? ()
No symbol table info available.
#20 0x0047c4e7 in ?? ()
No symbol table info available.
#21 0x0047c4e7 in ?? ()
No symbol table info available.
#22 0x0047c4e7 in ?? ()
No symbol table info available.
---Type return to continue, or q return to quit---
#23 0x0047c4e7 in ?? ()
No symbol table info available.
#24 0x0047c4e7 in ?? ()
No symbol table info available.
#25 0x0047c4e7 in ?? ()
No symbol table info available.
#26 0x0047c4e7 in ?? ()
No symbol table info available.
#27 0x0047c4e7 in ?? ()
No symbol table info available.
#28 0x0047c4e7 in ?? ()
No symbol table info available.
#29 0x004186be in main ()
No symbol table info available.



On Wednesday, 4 June 2014, 17:49, Bogdan-Andrei Iancu 
bog...@opensips.org wrote:



Hi Pasan,

Please be sure you are using the DB schema for 1.11 (see 
http://www.opensips.org/Documentation/Install-DBSchema-1-10#AEN7254 ) 
- check the DB types and the content.


Also, follow this tutorial 
http://www.opensips.org/Documentation/TroubleShooting-Crash in order 
to extract and post here the 

Re: [OpenSIPS-Users] opensips crash with location data

2014-06-05 Thread Pasan Meemaduma
Hi Bogdan,

Thanks for the reply. I created the table using normal schema it looks fine to 
me. I was refering to the old url you gave me. There in that table attr was 
missing :)


this is the url missing attr in location table
http://www.opensips.org/Documentation/Install-DBSchema-1-10#AEN7254  


below is my table schema,

mysql desc location;
+---+--+--+-+-++
| Field | Type | Null | Key | Default | Extra   
   |
+---+--+--+-+-++
| id    | int(10) unsigned | NO   | PRI | NULL    | 
auto_increment |
| username  | char(64) | NO   | MUL | | 
   |
| domain    | char(64) | YES  | | NULL    | 
   |
| contact   | char(255)    | NO   | | | 
   |
| received  | char(128)    | YES  | | NULL    | 
   |
| path  | char(128)    | YES  | | NULL    | 
   |
| expires   | datetime | NO   | | 2020-05-28 21:32:15 | 
   |
| q | float(10,2)  | NO   | | 1.00    | 
   |
| callid    | char(255)    | NO   | | Default-Call-ID | 
   |
| cseq  | int(11)  | NO   | | 13  | 
   |
| last_modified | datetime | NO   | | 1900-01-01 00:00:01 | 
   |
| flags | int(11)  | NO   | | 0   | 
   |
| cflags    | int(11)  | NO   | | 0   | 
   |
| user_agent    | char(255)    | NO   | | | 
   |
| socket    | char(64) | YES  | | NULL    | 
   |
| methods   | int(11)  | YES  | | NULL    | 
   |
| sip_instance  | char(255)    | YES  | | NULL    | 
   |
| attr  | char(255)    | YES  | | NULL    | 
   |
+---+--+--+-+-++


attr holds NULL values for all entries.

do I have to run below in gdb after running bt full right ?

this is what i got

(gdb) f 1
#1  0x7f64823a60a2 in dbrow2info (contact=0x7fffe0246180, 
vals=0x7f648287a260) at udomain.c:306
306    in udomain.c
(gdb) p (vals+6)-val.string_val
$2 = 0x0
(gdb) 


-without running bt full - just in case :)
(gdb) f 1
#1  0x7f64823a60a2 in dbrow2info (contact=0x7fffe0246180, 
vals=0x7f648287a260) at udomain.c:306
306    udomain.c: No such file or directory.
(gdb) p (vals+6)-val.string_val
$1 = 0x0




On Thursday, 5 June 2014, 17:07, Bogdan-Andrei Iancu bog...@opensips.org 
wrote:
 


Thanks for the backtrace. In DB, what do you have for the attr value ? NULL 
or an empty string ?

In gdb, could you do:
    f 1
    p (vals+6)-val.string_val

Thanks,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer http://www.opensips-solutions.com
On 05.06.2014 06:15, Pasan Meemaduma wrote:

oops sorry I forgot opensips-dbg :) bt reattached.


I have change some sensitive values with 'x' as below, hope it wont affect u r 
investigations


    contact = {s = 0xf91eab sip:xxx...@xxx.xxx.xxx.xx, len = 29}




On Thursday, 5 June 2014, 8:34, Pasan Meemaduma pasan...@ymail.com wrote:
 


Hi Bogdan,


I double checked the schema and it is correct. btw doc needs fixing its 
missing attr column which is needed by 1.10 for location table otherwise I'll 
get below error.


Jun  5 12:57:26  x/usr/sbin/opensips[30176]: 
CRITICAL:db_mysql:wrapper_single_mysql_real_query: driver error (1054): 
Unknown column 'attr' in 'field list'
Jun  5 12:57:26 x /usr/sbin/opensips[30177]:
DBG:core:db_do_init: connection 0x7f4dc04c1c28
inserted in pool as 0x7f4dc04c1d30
Jun  5 12:57:26 x /usr/sbin/opensips[30176]:
ERROR:core:db_do_query: error while submitting
query - [select

username,contact,expires,q,callid,cseq,flags,cflags,user_agent,received,path,socket,methods,last_modified,sip_instance,attr
from location ]
Jun  5 12:57:26 anacardium3backup
/usr/sbin/opensips[30176]:
ERROR:usrloc:preload_udomain: db_query (1)
failed


:)



I got the backtrace as you requested , It doesn't seems right to me.  does it 
make any sense ? or did I miss something getting it ?



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] opensips crash with location data

2014-06-05 Thread Pasan Meemaduma
Hi Bogdan,

I just found that I have got the key constraint wrong. Will that be the issue ?

| location | CREATE TABLE `location` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `username` char(64) NOT NULL DEFAULT '',
  `domain` char(64) DEFAULT NULL,
  `contact` char(255) NOT NULL DEFAULT '',
  `received` char(128) DEFAULT NULL,
  `path` char(128) DEFAULT NULL,
  `expires` datetime NOT NULL DEFAULT '2020-05-28 21:32:15',
  `q` float(10,2) NOT NULL DEFAULT '1.00',
  `callid` char(255) NOT NULL DEFAULT 'Default-Call-ID',
  `cseq` int(11) NOT NULL DEFAULT '13',
  `last_modified` datetime NOT NULL DEFAULT '1900-01-01 00:00:01',
  `flags` int(11) NOT NULL DEFAULT '0',
  `cflags` int(11) NOT NULL DEFAULT '0',
  `user_agent` char(255) NOT NULL DEFAULT '',
  `socket` char(64) DEFAULT NULL,
  `methods` int(11) DEFAULT NULL,
  `sip_instance` char(255) DEFAULT NULL,
  `attr` char(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `account_contact_idx` (`username`,`domain`,`contact`)
) ENGINE=MyISAM AUTO_INCREMENT=25375081 DEFAULT CHARSET=latin1 |


account_contact_idx is missing callid column. Will this has any relation to 
crash ?



On Friday, 6 June 2014, 8:48, Pasan Meemaduma pasan...@ymail.com wrote:
 


Hi Bogdan,

Thanks for the reply. I created the table using normal schema it looks fine to 
me. I was refering to the old url you gave me. There in that table attr was 
missing :)


this is the url missing attr in location table
http://www.opensips.org/Documentation/Install-DBSchema-1-10#AEN7254  


below is my table schema,

mysql desc location;
+---+--+--+-+-++
| Field | Type | Null | Key | Default | Extra   
   |
+---+--+--+-+-++
| id    | int(10) unsigned | NO   | PRI | NULL    | 
auto_increment |
|
 username  | char(64) | NO   | MUL | |  
  |
| domain    | char(64) | YES  | | NULL    | 
   |
| contact   | char(255)    | NO   |
 | |    |
| received  | char(128)    | YES  | | NULL    | 
   |
| path  | char(128)    | YES  | | NULL    | 
   |
|
 expires   | datetime | NO   | | 2020-05-28 21:32:15 |  
  |
| q | float(10,2)  | NO   | | 1.00    | 
   |
| callid    | char(255)    | NO   | | Default-Call-ID | 
   |
|
 cseq  | int(11)  | NO   | | 13  |  
  |
| last_modified | datetime | NO   | | 1900-01-01 00:00:01 | 
   |
| flags | int(11)  | NO   | | 0  
 |    |
| cflags    | int(11)  | NO   | | 0   | 
   |
| user_agent    | char(255)    | NO   | | | 
   |
| socket    |
 char(64) | YES  | | NULL    |    |
| methods   | int(11)  | YES  | | NULL    | 
   |
| sip_instance  | char(255)    | YES  | | NULL   
 |    |
| attr  | char(255)    | YES  | | NULL    | 
   |
+---+--+--+-+-++


attr holds NULL values for all entries.

do I have to run below in gdb after running bt full right ?

this is what i got

(gdb) f 1
#1  0x7f64823a60a2 in dbrow2info
 (contact=0x7fffe0246180, vals=0x7f648287a260) at udomain.c:306
306    in udomain.c
(gdb) p (vals+6)-val.string_val
$2 = 0x0
(gdb) 


-without running bt full - just in case :)
(gdb) f 1
#1  0x7f64823a60a2 in dbrow2info (contact=0x7fffe0246180, 
vals=0x7f648287a260) at udomain.c:306
306    udomain.c: No such file or directory.
(gdb) p (vals+6)-val.string_val
$1 = 0x0




On Thursday, 5 June 2014, 17:07, Bogdan-Andrei Iancu bog...@opensips.org 
wrote:
 


Thanks for the backtrace. In DB, what do you have for the attr value ? NULL 
or an empty string ?

In gdb, could you do:
    f 1
    p (vals+6)-val.string_val

Thanks,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer http://www.opensips-solutions.com
On 05.06.2014 06:15, Pasan Meemaduma wrote:

oops sorry I forgot opensips-dbg :) bt reattached.


I have change some sensitive values with 'x' as below, hope it wont affect u r 
investigations


    contact = {s = 0xf91eab sip:xxx...@xxx.xxx.xxx.xx, len = 29}




On Thursday, 5 June 2014, 8:34, Pasan Meemaduma pasan...@ymail.com wrote:
 


Hi Bogdan,


I double checked the schema and it is correct. btw doc needs fixing its 
missing attr column which is needed by 1.10 for location table otherwise I'll 
get below error.


Re: [OpenSIPS-Users] opensips crash with location data

2014-06-04 Thread Bogdan-Andrei Iancu

Hi Pasan,

Please be sure you are using the DB schema for 1.11 (see 
http://www.opensips.org/Documentation/Install-DBSchema-1-10#AEN7254 ) - 
check the DB types and the content.


Also, follow this tutorial 
http://www.opensips.org/Documentation/TroubleShooting-Crash in order to 
extract and post here the backtrace of your crash.


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 03.06.2014 06:34, Pasan Meemaduma wrote:

Hi Guys,

I recently migrate a opensips 1.5.3 server to a 1.10.1. Everything 
went fine expect I couldn't bring up opensips with old location data 
it crashes everytime there's data in location table, I have even fix 
the column count before starting opensips. when I delete all records 
from location table and then start opensips it works fine.


So now everytime I have to restart opensips I have to delete location 
table entries. Could you please check if this a bug, I have attach the 
debug trace here.


According to the debug log it gets a segfault while parsing location data.

CPU 2.3 GHz x 2
OS x64 bit debian 7.5

ii opensips 1.10.1-1~1 amd64very 
fast and configurable SIP server
ii  opensips-carrierroute-module 1.10.1-1~1
amd64Carrierroute module for OpenSIPS
ii  opensips-memcached-module 1.10.1-1~1amd64
Interface module to interact with a memcached server
ii  opensips-mysql-module 1.10.1-1~1amd64MySQL 
database connectivity module for OpenSIPS



Jun  3 12:25:32 [6982] DBG:db_mysql:db_mysql_str2val: converting 
STRING [xx)]
Jun  3 12:25:32 [6982] DBG:db_mysql:db_mysql_str2val: converting 
STRING [udp:xxx:5060]
Jun  3 12:25:32 [6982] DBG:db_mysql:db_mysql_str2val: converting 
DATETIME [2014-06-01 01:14:14]
Jun  3 12:25:32 [6982] DBG:db_mysql:db_mysql_str2val: converting 
STRING []
Jun  3 12:25:32 [6982] DBG:db_mysql:db_mysql_str2val: converting 
STRING [sip:xxx@xxx:5060]
Jun  3 12:25:32 [6982] DBG:db_mysql:db_mysql_str2val: converting 
DATETIME [2014-06-01 01:16:40]
Jun  3 12:25:32 [6982] DBG:db_mysql:db_mysql_str2val: converting 
DOUBLE [-1.00]
Jun  3 12:25:32 [6982] DBG:db_mysql:db_mysql_str2val: converting 
STRING [77baea9e4abc04810fc1992d56c7a2f4@xxx]
Jun  3 12:25:32 [6982] DBG:db_mysql:db_mysql_str2val: converting INT 
[88543]

Jun  3 12:25:32 [6982] DBG:db_mysql:db_mysql_str2val: converting INT [0]
Jun  3 12:25:32 [6982] DBG:db_mysql:db_mysql_str2val: converting INT [0]
Jun  3 12:25:32 [6982] DBG:db_mysql:db_mysql_str2val: converting 
STRING [FPBX-2.11.0(11.5.1)]
Jun  3 12:25:32 [6982] DBG:db_mysql:db_mysql_str2val: converting 
STRING [udp::5060]
Jun  3 12:25:32 [6982] DBG:db_mysql:db_mysql_str2val: converting 
DATETIME [2014-06-01 01:14:40]
Jun  3 12:25:32 [6982] DBG:usrloc:preload_udomain: loading records - 
cycle [1]
Jun  3 12:25:32 [6977] DBG:core:wait_status_code: read code 0 ? rc = 
0, errno=Success
Jun  3 12:25:32 [6977] INFO:core:daemonize: pre-daemon process exiting 
with -1

 already running.
Jun  3 12:25:32 [6979] DBG:core:handle_sigs: status = 11
Jun  3 12:25:32 [6979] INFO:core:handle_sigs: child process 6982 
exited by a signal 11

Jun  3 12:25:32 [6979] INFO:core:handle_sigs: core was not generated
Jun  3 12:25:32 [6979] INFO:core:handle_sigs: terminating due to SIGCHLD
Jun  3 12:25:32 [6995] INFO:core:sig_usr: signal 15 received
Jun  3 12:25:32 [6991] INFO:core:sig_usr: signal 15 received
Jun  3 12:25:32 [6996] INFO:core:sig_usr: signal 15 received
Jun  3 12:25:32 [6988] INFO:core:sig_usr: signal 15 received
Jun  3 12:25:32 [6994] INFO:core:sig_usr: signal 15 received
Jun  3 12:25:32 [6984] INFO:core:sig_usr: signal 15 received

Expecting an advice on this.

Thanks.

Pasan.


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] opensips crash with location data

2014-06-04 Thread Pasan Meemaduma
Hi Bogdan,

I double checked the schema and it is correct. btw doc needs fixing its missing 
attr column which is needed by 1.10 for location table otherwise I'll get below 
error.

Jun  5 12:57:26  x/usr/sbin/opensips[30176]: 
CRITICAL:db_mysql:wrapper_single_mysql_real_query: driver error (1054): Unknown 
column 'attr' in 'field list'
Jun  5 12:57:26 x /usr/sbin/opensips[30177]: DBG:core:db_do_init: connection 
0x7f4dc04c1c28 inserted in pool as 0x7f4dc04c1d30
Jun  5 12:57:26 x /usr/sbin/opensips[30176]: ERROR:core:db_do_query: error 
while submitting query - [select 
username,contact,expires,q,callid,cseq,flags,cflags,user_agent,received,path,socket,methods,last_modified,sip_instance,attr
 from location ]
Jun  5 12:57:26 anacardium3backup /usr/sbin/opensips[30176]: 
ERROR:usrloc:preload_udomain: db_query (1) failed


:)


I got the backtrace as you requested , It doesn't seems right to me.  does it 
make any sense ? or did I miss something getting it ?


gdb opensips core.opensips.sig11.29154
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type show copying
and show warranty for details.
This GDB was configured as x86_64-linux-gnu.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /usr/sbin/opensips...(no debugging symbols found)...done.
[New LWP 29154]

warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library /lib/x86_64-linux-gnu/libthread_db.so.1.

warning: no loadable sections found in added symbol-file system-supplied DSO at 
0x779fe000
Core was generated by `/usr/sbin/opensips -P /var/run/opensips/opensips.pid -m 
512 -M 16 -u opensips -'.
Program terminated with signal 11, Segmentation fault.
#0  0x7f3a71ab4f21 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt full
#0  0x7f3a71ab4f21 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#1  0x7f3a703b50a2 in preload_udomain () from 
/usr/lib/opensips/modules/usrloc.so
No symbol table info available.
#2  0x7f3a703b8fb6 in ?? () from /usr/lib/opensips/modules/usrloc.so
No symbol table info available.
#3  0x0047c617 in ?? ()
No symbol table info available.
#4  0x0047c4e7 in ?? ()
No symbol table info available.
#5  0x0047c4e7 in ?? ()
No symbol table info available.
#6  0x0047c4e7 in ?? ()
No symbol table info available.
#7  0x0047c4e7 in ?? ()
No symbol table info available.
#8  0x0047c4e7 in ?? ()
No symbol table info available.
#9  0x0047c4e7 in ?? ()
No symbol table info available.
#10 0x0047c4e7 in ?? ()
No symbol table info available.
#11 0x0047c4e7 in ?? ()
No symbol table info available.
#12 0x0047c4e7 in ?? ()
No symbol table info available.
#13 0x0047c4e7 in ?? ()
No symbol table info available.
#14 0x0047c4e7 in ?? ()
No symbol table info available.
#15 0x0047c4e7 in ?? ()
No symbol table info available.
#16 0x0047c4e7 in ?? ()
No symbol table info available.
#17 0x0047c4e7 in ?? ()
No symbol table info available.
#18 0x0047c4e7 in ?? ()
No symbol table info available.
#19 0x0047c4e7 in ?? ()
No symbol table info available.
#20 0x0047c4e7 in ?? ()
No symbol table info available.
#21 0x0047c4e7 in ?? ()
No symbol table info available.
#22 0x0047c4e7 in ?? ()
No symbol table info available.
---Type return to continue, or q return to quit---
#23 0x0047c4e7 in ?? ()
No symbol table info available.
#24 0x0047c4e7 in ?? ()
No symbol table info available.
#25 0x0047c4e7 in ?? ()
No symbol table info available.
#26 0x0047c4e7 in ?? ()
No symbol table info available.
#27 0x0047c4e7 in ?? ()
No symbol table info available.
#28 0x0047c4e7 in ?? ()
No symbol table info available.
#29 0x004186be in main ()
No symbol table info available.




On Wednesday, 4 June 2014, 17:49, Bogdan-Andrei Iancu bog...@opensips.org 
wrote:
 


Hi Pasan,

Please be sure you are using the DB schema for 1.11 (see 
http://www.opensips.org/Documentation/Install-DBSchema-1-10#AEN7254 ) - check 
the DB types and the content.

Also, follow this tutorial 
http://www.opensips.org/Documentation/TroubleShooting-Crash in order to extract 
and post here the backtrace of your crash.

Regards,
 
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer http://www.opensips-solutions.com
On 03.06.2014 06:34, Pasan Meemaduma wrote:

Hi Guys,


I recently migrate a opensips 1.5.3 server to a 1.10.1. Everything went fine 
expect I couldn't bring up opensips with old location data it crashes 
everytime there's data in location table, I have even fix the column count 
before