dbTalk Databases Forums  

[msql-list] Problems with FreeBSD 7.0

mailing.database.w3-msql mailing.database.w3-msql


Discuss [msql-list] Problems with FreeBSD 7.0 in the mailing.database.w3-msql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Doug Hardie
 
Posts: n/a

Default [msql-list] Problems with FreeBSD 7.0 - 04-04-2008 , 04:47 PM






I am encountering problems with msql 3.8 on FreeBSD 7.0. Some things
just crash. The latest one is multiple queries to the same database.
If I connect to the database and issue a query, I get the right
results. However, if I issue a second query that is basically the
same, just some of the values change, then malloc gives a segmentation
violation. The problem occurs in readQueryData. malloc has changed
in 7.0 in that it no longer pads the requested size to a full block.
I have had a few problems with that in my code. So I added 8 to each
of the malloc sizes and rebuilt msql. No change. Same error. I then
put a msqlClose after the first query and a msqlConnect after that.
The connect now fails the second time

Program received signal SIGSEGV, Segmentation fault.
0x280e6e12 in calloc () from /lib/libc.so.7
(gdb) where
#0 0x280e6e12 in calloc () from /lib/libc.so.7
#1 0x28148b8c in __hash_open () from /lib/libc.so.7
#2 0x281481b2 in dbopen () from /lib/libc.so.7
#3 0x28101d27 in getpwent_r () from /lib/libc.so.7
#4 0x2810362b in getpwent_r () from /lib/libc.so.7
#5 0x28135834 in nsdispatch () from /lib/libc.so.7
#6 0x28101264 in getpwuid_r () from /lib/libc.so.7
#7 0x281012b9 in getpwuid_r () from /lib/libc.so.7
#8 0x28100e7e in xdr_authunix_parms () from /lib/libc.so.7
#9 0x0804dac3 in msqlConnect ()
#10 0x08049e2f in main (argc=1, argv=0xbfbfec9c) at notify.c:179

I am at a loss at solving this problem. It is adversly affecting us.
What can I do to help resolve it?
-----------------------------------------------------------------
This is the Mini SQL Mailing List operated by Hughes Technologies
To unsubscribe, go to http://www.Hughes.com.au/extras/email/

Reply With Quote
  #2  
Old   
Doug Hardie
 
Posts: n/a

Default Re: [msql-list] Problems with FreeBSD 7.0 - 04-04-2008 , 05:15 PM







On Apr 4, 2008, at 14:38, Doug Hardie wrote:
Quote:
I am encountering problems with msql 3.8 on FreeBSD 7.0. Some
things just crash. The latest one is multiple queries to the same
database. If I connect to the database and issue a query, I get the
right results. However, if I issue a second query that is basically
the same, just some of the values change, then malloc gives a
segmentation violation. The problem occurs in readQueryData.
malloc has changed in 7.0 in that it no longer pads the requested
size to a full block. I have had a few problems with that in my
code. So I added 8 to each of the malloc sizes and rebuilt msql.
No change. Same error. I then put a msqlClose after the first
query and a msqlConnect after that. The connect now fails the
second time

Program received signal SIGSEGV, Segmentation fault.
0x280e6e12 in calloc () from /lib/libc.so.7
(gdb) where
#0 0x280e6e12 in calloc () from /lib/libc.so.7
#1 0x28148b8c in __hash_open () from /lib/libc.so.7
#2 0x281481b2 in dbopen () from /lib/libc.so.7
#3 0x28101d27 in getpwent_r () from /lib/libc.so.7
#4 0x2810362b in getpwent_r () from /lib/libc.so.7
#5 0x28135834 in nsdispatch () from /lib/libc.so.7
#6 0x28101264 in getpwuid_r () from /lib/libc.so.7
#7 0x281012b9 in getpwuid_r () from /lib/libc.so.7
#8 0x28100e7e in xdr_authunix_parms () from /lib/libc.so.7
#9 0x0804dac3 in msqlConnect ()
#10 0x08049e2f in main (argc=1, argv=0xbfbfec9c) at notify.c:179

I am at a loss at solving this problem. It is adversly affecting
us. What can I do to help resolve it?

Finally found a workaround. I increased the size of some of the text
fields I had allocated by a bunch and malloc no longer fails. I have
no idea why this works. It was purely a desperation attempt. This
rendition of malloc is definitely weird.

-----------------------------------------------------------------
This is the Mini SQL Mailing List operated by Hughes Technologies
To unsubscribe, go to http://www.Hughes.com.au/extras/email/


Reply With Quote
  #3  
Old   
David J. Hughes
 
Posts: n/a

Default Re: [msql-list] Problems with FreeBSD 7.0 - 04-04-2008 , 08:40 PM




Doug,

Do you have a spare 7.0 box on the net I can access? Happy to run
this up and debug it if you have an appropriate box.



David
...



On 05/04/2008, at 7:38 AM, Doug Hardie wrote:

Quote:
I am encountering problems with msql 3.8 on FreeBSD 7.0. Some
things just crash. The latest one is multiple queries to the same
database. If I connect to the database and issue a query, I get
the right results. However, if I issue a second query that is
basically the same, just some of the values change, then malloc
gives a segmentation violation. The problem occurs in
readQueryData. malloc has changed in 7.0 in that it no longer pads
the requested size to a full block. I have had a few problems with
that in my code. So I added 8 to each of the malloc sizes and
rebuilt msql. No change. Same error. I then put a msqlClose
after the first query and a msqlConnect after that. The connect
now fails the second time

Program received signal SIGSEGV, Segmentation fault.
0x280e6e12 in calloc () from /lib/libc.so.7
(gdb) where
#0 0x280e6e12 in calloc () from /lib/libc.so.7
#1 0x28148b8c in __hash_open () from /lib/libc.so.7
#2 0x281481b2 in dbopen () from /lib/libc.so.7
#3 0x28101d27 in getpwent_r () from /lib/libc.so.7
#4 0x2810362b in getpwent_r () from /lib/libc.so.7
#5 0x28135834 in nsdispatch () from /lib/libc.so.7
#6 0x28101264 in getpwuid_r () from /lib/libc.so.7
#7 0x281012b9 in getpwuid_r () from /lib/libc.so.7
#8 0x28100e7e in xdr_authunix_parms () from /lib/libc.so.7
#9 0x0804dac3 in msqlConnect ()
#10 0x08049e2f in main (argc=1, argv=0xbfbfec9c) at notify.c:179

I am at a loss at solving this problem. It is adversly affecting
us. What can I do to help resolve it?
-----------------------------------------------------------------
This is the Mini SQL Mailing List operated by Hughes Technologies
To unsubscribe, go to http://www.Hughes.com.au/extras/email/

-----------------------------------------------------------------
This is the Mini SQL Mailing List operated by Hughes Technologies
To unsubscribe, go to http://www.Hughes.com.au/extras/email/


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.