I'm pretty clue-less why you get this error-message when "memcpy(&(pn->lock), &(opaque->key), sizeof(struct devlock *));" is called.
==00:01:31:14.563 2670== Invalid read of size 8 ==00:01:31:14.563 2670== at 0x4C568B7: LockGet (ow_locks.c:193) ==00:01:31:14.563 2670== by 0x4C5D8A1: FS_r_given_bus (ow_read.c:231) ==00:01:31:14.563 2670== by 0x4C5DB01: FS_read_distribute (ow_read.c:193) But... your owserver didn't seem to crash now? Is the major problem fixed now? I have checked in some various fixed some minutes ago, but nothing special that should affect this issue. /Christian -----Original Message----- From: Serg Oskin [mailto:s...@oskin.ru] Sent: Monday, December 22, 2008 7:50 PM To: owfs-developers@lists.sourceforge.net Subject: Re: [Owfs-developers] general protection I later corrected this. :) But this did not help. :( Serg. > Sorry... I made a typo in the code... the memcpy row should look like this: > > memcpy(&(pn->lock), &(opaque->key), sizeof(struct devlock *)); > > Forgot to get the pointer's to the variables, and therefore it ended > up with a segmentation fault instead... > Can you try to change the row and recompile with memcpy again? > > /Christian > > > -----Original Message----- > From: Serg Oskin [mailto:s...@oskin.ru] > Sent: Monday, December 22, 2008 12:13 PM > To: owfs-developers@lists.sourceforge.net > Subject: Re: [Owfs-developers] general protection > >> Now running CVS-version on 9:30 UTC 2008-12-22 ... > > Results of file attachments. > > Serg. > >> Serg. >> >>> Hi Serg, >>> >>> Interesting log-files... It seems that your compiler generate wrong > code... >>> ==00:06:33:57.651 2275== Invalid read of size 8 >>> ==00:06:33:57.651 2275== at 0x4C56559: LockGet (ow_locks.c:195) >>> >>> ==00:06:33:57.651 2275== Address 0x5A0D750 is 0 bytes inside a >>> block of size 32 free'd >>> ==00:06:33:57.651 2275== at 0x4A0541E: free (vg_replace_malloc.c:233) >>> ==00:06:33:57.651 2275== by 0x30D8ED02B6: tdelete (in > /lib64/libc-2.5.so) >>> tsearch() seem to return a pointer to opaque, but "pn->lock = > opaque->key" >>> results "Invalid read of size 8"... ? >>> I have made some changes in the code, and that might fix the problem. >>> Size of "struct devlock" might have be unknown at some places and I >>> have moved around the definitions a bit. >>> >>> Can you checkout the latest CVS-version and try it? >>> >>> >>> >>> If this doesn't work, you can try to edit >>> module/owlib/src/c/ow_locks.c and change two rows... >>> pn->lock = (struct devlock *)opaque->key; /* Serg: Invalid >>> read of size 8 */ >>> /* Why should a pointer compare fail? Unaligned memory? >>> Perhaps try to copy the pointer with memcpy() instead. >>> Will this help? >>> */ >>> //memcpy(pn->lock, opaque->key, sizeof(struct devlock *)); >>> >>> Comment out the row "pn->lock = " and uncomment memcpy instead.... >>> Will this work for better for you? >>> It should remove the warning of "Invalid read of size 8" at least, >>> and perhaps everything will work then as well. >>> >>> BTW: Which platform are you using? I have a feeling that your >>> source isn't compiled with -m64, even if it should be... >>> Could you look at the host_cpu in config.log and "uname -a" >>> # grep host_cpu cvs/owfs/config.log >>> # uname -a >>> >>> /Christian >>> >>> >>> -----Original Message----- >>> From: Serg Oskin [mailto:s...@oskin.ru] >>> Sent: Saturday, December 20, 2008 10:33 PM >>> To: owfs-developers@lists.sourceforge.net >>> Subject: Re: [Owfs-developers] general protection >>> >>> Ctrl-C pressed. >>> >>> >>>> Tried - the result of old. >>>> Version: from CVS at Dec 20 2008 12:00 UTC. >>>> >>>> Message in /tmp/owfs_fatal I received only once during the "kill >>>> owserver_pid": >>>> ow_connect.c:322 mutex_destroy failed rc=16 [Device or resource >>>> busy] >>>> >>>> Serg. >>> >>> >>> __________ Information from ESET NOD32 Antivirus, version of virus >>> signature database 3709 (20081220) __________ >>> >>> The message was checked by ESET NOD32 Antivirus. >>> >>> http://www.eset.com >>> >>> >>> >>> __________ Information from ESET NOD32 Antivirus, version of virus >>> signature database 3709 (20081220) __________ >>> >>> The message was checked by ESET NOD32 Antivirus. >>> >>> http://www.eset.com >>> >>> >>> >>> -------------------------------------------------------------------- >>> - >>> --------- _______________________________________________ >>> Owfs-developers mailing list >>> Owfs-developers@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/owfs-developers >>> >>> >> --------------------------------------------------------------------- >> - >> -------- _______________________________________________ >> Owfs-developers mailing list >> Owfs-developers@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/owfs-developers >> >> > > > __________ Information from ESET NOD32 Antivirus, version of virus > signature database 3710 (20081222) __________ > > The message was checked by ESET NOD32 Antivirus. > > http://www.eset.com > > > > __________ Information from ESET NOD32 Antivirus, version of virus > signature database 3710 (20081222) __________ > > The message was checked by ESET NOD32 Antivirus. > > http://www.eset.com > > > > ---------------------------------------------------------------------- > -------- _______________________________________________ > Owfs-developers mailing list > Owfs-developers@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/owfs-developers > > __________ Information from ESET NOD32 Antivirus, version of virus signature database 3710 (20081222) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ------------------------------------------------------------------------------ _______________________________________________ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers