vknetd SIGPIPE

Link to this paste: http://bugs.dragonflybsd.org/pastes/381

Added by tuxillo almost 3 years ago.
Syntax: Plain Text

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
(gdb) r -d 172.16.1.1/16
Starting program: /usr/sbin/vknetd -d 172.16.1.1/16

Program received signal SIGPIPE, Broken pipe.
0x0000000800ac18c8 in accept () at accept.S:2
2       RSYSCALL(accept)
(gdb) bt
#0  0x0000000800ac18c8 in accept () at accept.S:2
#1  0x000000080084deb7 in __accept (s=4, addr=0x7ffffffff5a0, addrlen=0x7ffffffff624)
    at /home/source/dfbsd/lib/libthread_xu/thread/thr_syscalls.c:170
#2  0x0000000000401fd9 in vknet_acceptor (net_fd=<optimized out>)
    at /home/source/dfbsd/usr.sbin/vknetd/vknetd.c:377
#3  main (ac=<optimized out>, av=<optimized out>)
    at /home/source/dfbsd/usr.sbin/vknetd/vknetd.c:172

(gdb) frame 3
#3  main (ac=<optimized out>, av=<optimized out>)
    at /home/source/dfbsd/usr.sbin/vknetd/vknetd.c:172
172             vknet_acceptor(net_fd);
(gdb) l
167             signal(SIGHUP, cleanup);
168             signal(SIGTERM, cleanup);
169
170             pthread_mutex_init(&BridgeMutex, NULL);
171             pthread_create(&dummy_td, NULL, vknet_io, tap_info);
172             vknet_acceptor(net_fd);
173
174             exit(0);
175     }
176

(gdb) frame 2
#2  0x0000000000401fd9 in vknet_acceptor (net_fd=<optimized out>)
    at /home/source/dfbsd/usr.sbin/vknetd/vknetd.c:377
377                     rfd = accept(net_fd, (void *)&sunx, &sunx_len);
(gdb) l
372             int rfd;
373             ioinfo_t info;
374
375             for (;;) {
376                     sunx_len = sizeof(sunx);
377                     rfd = accept(net_fd, (void *)&sunx, &sunx_len);
378                     if (rfd < 0)
379                             break;
380                     info = malloc(sizeof(*info));
381                     bzero(info, sizeof(*info));

(gdb) frame 1
#1  0x000000080084deb7 in __accept (s=4, addr=0x7ffffffff5a0, addrlen=0x7ffffffff624)
    at /home/source/dfbsd/lib/libthread_xu/thread/thr_syscalls.c:170
170             ret = __sys_accept(s, addr, addrlen);
(gdb) l
165             int oldcancel;
166             int ret;
167
168             curthread = tls_get_curthread();
169             oldcancel = _thr_cancel_enter(curthread);
170             ret = __sys_accept(s, addr, addrlen);
171             _thr_cancel_leave(curthread, oldcancel);
172
173             return (ret);
174     }

(gdb) frame 0
#0  0x0000000800ac18c8 in accept () at accept.S:2
2       RSYSCALL(accept)
(gdb) l
1       #include "SYS.h"
2       RSYSCALL(accept)
        

Download