I think I was wrong. I've acquired new information, and I believe the strace logs I've placed previously were not the results of the crashing, just of the harmless resetting. However, it does crash as well.
That's all I have from that, though, since I set up some script stuff to delete the log every minute but back up the log if upnp is found closed.Code:...
) = -1 ETIMEDOUT (Connection timed out)
close(9) = 0
setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={0, 700000}}, NULL) = 0
getitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={0, 700000}}) = 0
rt_sigprocmask(SIG_UNBLOCK, [ALRM], NULL, 16) = 0
sigreturn() = ? (mask now [RT_37 RT_38 RT_39 RT_41 RT_45 RT_50 RT_61])
read(6, "SUBSCRIBE /uuid:0011d81b-f83e-00"..., 399) = 354
time(NULL) = 1115528116
read(5, "\312\3\0\0", 11) = 4
read(5, "\312\3\0\0", 11) = 4
time(NULL) = 1115528116
write(6, "HTTP/1.1 200 OK\r\nServer: LINUX/2"..., 129) = -1 ECONNRESET (Connection reset by peer)
rt_sigprocmask(SIG_BLOCK, [ALRM], NULL, 16) = 0
getitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={0, 650000}}) = 0
rt_sigprocmask(SIG_UNBLOCK, [ALRM], NULL, 16) = 0
recvfrom(4, "NOTIFY * HTTP/1.1 \r\nHOST: 239.25"..., 2500, 0, {sa_family=AF_INET, sin_port=htons(1900), sin_addr=inet_addr("192.168.1.1")}, [16]) = 351
rt_sigprocmask(SIG_UNBLOCK, [ALRM], NULL, 16) = 0
_newselect(9, [3 4 6 8], NULL, NULL, NULL) = 4 (in [3 4 6 8])
rt_sigprocmask(SIG_BLOCK, [ALRM], NULL, 16) = 0
read(8, "UNSUBSCRIBE /uuid:0011d81b-f83e-"..., 399) = 304
time(NULL) = 1115528116
time(NULL) = 1115528116
time(NULL) = 1115528116
open("/etc/TZ", O_RDONLY) = 9
read(9, "PST8PDT\n", 68) = 8
read(9, "", 60) = 0
close(9) = 0
write(8, "HTTP/1.1 200 OK\r\nDATE: Sun, 08 M"..., 186) = -1 ECONNRESET (Connection reset by peer)
write(8, "", 0) = 0
read(6, "", 399) = 0
close(6) = 0
close(6) = -1 EBADF (Bad file descriptor)
recvfrom(4, "NOTIFY * HTTP/1.1 \r\nHOST: 239.25"..., 2500, 0, {sa_family=AF_INET, sin_port=htons(1900), sin_addr=inet_addr("192.168.1.1")}, [16]) = 383
accept(3, {sa_family=AF_INET, sin_port=htons(3772), sin_addr=inet_addr("192.168.1.12")}, [16]) = 6
time(NULL) = 1115528116
fcntl(6, F_GETFL) = 0x2 (flags O_RDWR)
ioctl(6, TIOCNXCL, 0x7fff7be0) = -1 EINVAL (Invalid argument)
rt_sigprocmask(SIG_UNBLOCK, [ALRM], NULL, 16) = 0
_newselect(9, [3 4 6 8], NULL, NULL, NULL) = 4 (in [3 4 6 8])
rt_sigprocmask(SIG_BLOCK, [ALRM], NULL, 16) = 0
read(6, "UNSUBSCRIBE /uuid:0011d81b-f83e-"..., 399) = 312
time(NULL) = 1115528116
time(NULL) = 1115528116
time(NULL) = 1115528116
open("/etc/TZ", O_RDONLY) = 9
read(9, "PST8PDT\n", 68) = 8
read(9, "", 60) = 0
close(9) = 0
write(6, "HTTP/1.1 200 OK\r\nDATE: Sun, 08 M"..., 186) = -1 ECONNRESET (Connection reset by peer)
write(6, "", 0) = 0
read(8, "", 399) = 0
close(8) = 0
close(8) = -1 EBADF (Bad file descriptor)
recvfrom(4, "NOTIFY * HTTP/1.1 \r\nHOST: 239.25"..., 2500, 0, {sa_family=AF_INET, sin_port=htons(1900), sin_addr=inet_addr("192.168.1.1")}, [16]) = 312
accept(3, {sa_family=AF_INET, sin_port=htons(3259), sin_addr=inet_addr("192.168.1.11")}, [16]) = 8
time(NULL) = 1115528116
fcntl(8, F_GETFL) = 0x2 (flags O_RDWR)
ioctl(8, TIOCNXCL, 0x7fff7be0) = -1 EINVAL (Invalid argument)
rt_sigprocmask(SIG_UNBLOCK, [ALRM], NULL, 16) = 0
_newselect(9, [3 4 6 8], NULL, NULL, NULL) = 3 (in [4 6 8])
rt_sigprocmask(SIG_BLOCK, [ALRM], NULL, 16) = 0
read(8, "GET /dynsvc/WANCommonInterfaceCo"..., 399) = 245
time(NULL) = 1115528116
open("/dev/null", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 9
ioctl(9, TIOCNXCL, 0x7fff7950) = -1 ENOTTY (Inappropriate ioctl for device)
write(9, "<?xml version=\"1.0\"?>\r\n<scpd xml"..., 256) = 256
write(9, "essType</name>\r\n<relatedStateVar"..., 256) = 256
write(9, "</direction>\r\n</argument>\r\n<argu"..., 256) = 256
write(9, "teVariable>PhysicalLinkStatus</r"..., 256) = 256
write(9, "sSent</relatedStateVariable>\r\n<d"..., 256) = 256
write(9, "edStateVariable>\r\n<direction>out"..., 256) = 256
write(9, "eVariable>\r\n<direction>out</dire"..., 256) = 256
write(9, "tion>out</direction>\r\n</argument"..., 256) = 256
write(9, "\n <allowedValue>POTS</allow"..., 256) = 256
write(9, "ayer1UpstreamMaxBitRate</name>\r\n"..., 256) = 256
write(9, "atus</name>\r\n <dataType>string<"..., 256) = 256
write(9, "edValueList>\r\n</stateVariable>\r\n"..., 256) = 256
write(9, "le>\r\n<stateVariable sendEvents=\""..., 256) = 256
write(9, "=\"no\">\r\n <name>TotalPacketsRece"..., 122) = 122
close(9) = 0
time(NULL) = 1115528116
open("/etc/TZ", O_RDONLY) = 9
read(9, "PST8PDT\n", 68) = 8
read(9, "", 60) = 0
close(9) = 0
write(8, "HTTP/1.0 200 OK\r\nSERVER: LINUX/2"..., 199) = -1 ECONNRESET (Connection reset by peer)
write(8, "HTTP/1.0 200 OK\r\nSERVER: LINUX/2"..., 256) = -1 EPIPE (Broken pipe)
--- SIGPIPE (Broken pipe) @ 0 (0) ---
+++ killed by SIGPIPE +++
Here's a helpful Google result:
I added signal(SIGPIPE,SIG_IGN) to upnp_main with the others. I'll see how it goes.Quote:
Signal: Pipe
This signal is raised when a program writes to a socket or fifo that has no readers. The default action of this signal is to cause the program to terminate.
You might see this message if you have a series of commands in a shell pipe line and one of the processes quits. Eg:
$ cat somefile | head
After "head" has printed out the first 10 lines and quits, "cat" will get a pipe error. However, cat catches the signal and quits gracefully. If you pipe the output of some cvs(1) commands into less(1) and quit, then you might see the shell print out a message as cvs doesn't handle this signal gracefully.
Another example, using strace(1) to show system calls:
$ strace ls /etc | echo
execve("/bin/ls", ["ls", "/etc"], [/* 52 vars */]) = 0
...
write(1, "a2ps\nadjtime\napache2\napm\nasound."..., 1593) = -1 EPIPE (Broken pipe)
--- SIGPIPE (Broken pipe) @ 0 (0) ---
+++ killed by SIGPIPE +++
$
If you get this message when writing to a socket, it can be avoided by passing MSG_NOSIGNAL as a flag to send() or ignoring the signal by using signal(SIGPIPE,SIG_IGN);