Just ignore SIGPIPE in the main-function or something similar... The latest
fuse-source is ignoring SIGPIPE in it's signal-setup function, so owfs might
not be vulnerable if that setup-function is used. Owserver and owhttpd must
ignore the signal though... If the socket is broken while reading/writing,
it (the read()/write()) will return -1 instead of exiting the whole program.

/Christian



> -----Ursprungligt meddelande-----
> Från: [EMAIL PROTECTED] [mailto:owfs-
> [EMAIL PROTECTED] För Alfille, Paul H.,M.D.
> Skickat: den 1 oktober 2006 13:00
> Till: [email protected]
> Ämne: Re: [Owfs-developers] bug
> 
> Actually, I probably could use some help.
> How do I know which thread to map the error to? Will I also get a "write"
> error and so can just ignore the sigpipe entirely?
> 
> Paul Alfille
> 
> 
> -----Original Message-----
> From: [EMAIL PROTECTED] on behalf of Christian
> Magnusson
> Sent: Thu 9/28/2006 5:45 AM
> To: [email protected]
> Subject: Re: [Owfs-developers] bug
> 
> 
> SIGPIPE should be ignored by owserver/owfs/owhttpd and not exit when this
> is
> received. It's basically a network problem when writing to the socket. The
> write request should of course return an error, but it should not exit the
> whole application.
> 
> I haven't looked at the owfs source for some time now, but I'm sure Paul
> could make sure the signal is ignored pretty quick.
> 
> /Christian
> 
> 
> 
> > -----Ursprungligt meddelande-----
> > Från: [EMAIL PROTECTED] [mailto:owfs-
> > [EMAIL PROTECTED] För Roberto Spadim
> > Skickat: den 28 september 2006 09:31
> > Till: [email protected]
> > Ämne: [Owfs-developers] bug
> >
> >
> >  again the same backtrace: i think that's a problem to clone
> >
> >    DEBUG: ReadHandler: cm->payload=0 cm->size=0 cm->offset=0
> >    DEBUG: ReadHandler: sm->payload=38 sm->size=12 sm->offset=0
> >    DEBUG: READ_POSTPARSE /uncached/10.6F7EC9000800/temperature
> >    DEBUG: READ_POSTPOSTPARSE /uncached/10.6F7EC9000800/temperature
> >    DEBUG: READSEEK
> >    DEBUG: READSEEK2 pid=31424 not found in cache
> >    DEBUG:   Transaction readin = 0
> >    DEBUG: FS_r_single: (temperature) 28.4375
> >    DEBUG: Add to cache sn 10 6F 7E C9 00 08 00 0F in=0xb7fd6bac index=0
> >  size=12
> >    DEBUG: READ_POSTPOSTPARSE: /uncached/10.6F7EC9000800/temperature
> > return 12
> >    DEBUG: READ_POSTPARSE /uncached/10.6F7EC9000800/temperature return 12
> >    DEBUG: Read message done retbuffer=0x804cf70
> >    DEBUG: ParsedName_destroy /uncached/10.6F7EC9000800/temperature
> >    DEBUG: RealHandler: FS_ParsedName_destroy done
> >    DEBUG: RealHandler: cm.ret=12
> >     CALL: FS_r_single: format=11 s=12 offset=0
> >    DEBUG: Selecting a path (and device)
> >  path=/uncached/10.6F7EC9000800/temperature SN=10 6F 7E C9 00 08 00 0F
> >  last path=00 00 00 00 00 00 00 00
> >
> >  Program received signal SIGPIPE, Broken pipe.
> >  [Switching to Thread -1209861200 (LWP 17445)]
> >  0xffffe410 in __kernel_vsyscall ()
> >  (gdb) bt
> >  #0  0xffffe410 in __kernel_vsyscall ()
> >  #1  0xb7ee82d4 in do_writev () from /lib/tls/libc.so.6
> >  #2  0xb7ee839b in writev () from /lib/tls/libc.so.6
> >  #3  0x08048f89 in ToClient (fd=8, cm=0xb7e2f400, data=0xb7e2f360 "") at
> >  owserver.c:231
> >  #4  0x08049510 in RealHandler (v=0xb662b3ac) at owserver.c:399
> >  #5  0xb7f5d2b0 in start_thread () from /lib/tls/libpthread.so.0
> >  #6  0xb7eef7ce in clone () from /lib/tls/libc.so.6
> >  (gdb)
> >
> >
> > ------------------------------------------------------------------------
> -
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to share
> > your
> > opinions on IT & business topics through brief surveys -- and earn cash
> >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > _______________________________________________
> > Owfs-developers mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/owfs-developers
> 
> 
> 
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Owfs-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/owfs-developers




-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to