1 |
Hi! |
2 |
|
3 |
On Fri, Jan 27, 2012 at 10:40:43PM +0200, pageexec@××××××××.hu wrote: |
4 |
> > 2) When wireshark started by non-root user this option kill all my |
5 |
> > processes (https://bugs.gentoo.org/show_bug.cgi?id=379369): |
6 |
> can you generate a coredump and see what the backtrace shows? |
7 |
|
8 |
Actually I can't get core. :-/ Look: |
9 |
|
10 |
I've re-emerged wireshark using this: |
11 |
|
12 |
# CFLAGS="-march=prescott -O1 -pipe -ggdb" \ |
13 |
FEATURES="userpriv usersandbox userfetch parallel-fetch nostrip" \ |
14 |
emerge wireshark |
15 |
|
16 |
Now: |
17 |
|
18 |
$ sudo zgrep ELF_CORE /proc/config.gz |
19 |
CONFIG_ELF_CORE=y |
20 |
$ cat /proc/sys/kernel/core_pattern |
21 |
core |
22 |
$ grep core /etc/security/limits.conf | grep -v '^#' |
23 |
* soft core unlimited |
24 |
$ cat /etc/limits.conf |
25 |
* C20480 |
26 |
$ ulimit -c unlimited |
27 |
$ ulimit -c |
28 |
unlimited |
29 |
$ dumpcap |
30 |
Segmentation fault |
31 |
$ ls -l core |
32 |
ls: cannot access core: No such file or directory |
33 |
|
34 |
But under strace core generated ok: |
35 |
|
36 |
$ strace dumpcap |
37 |
... |
38 |
socket(PF_PACKET, SOCK_RAW, 768) = -1 EPERM (Operation not permitted) |
39 |
socket(PF_INET, SOCK_PACKET, 0x300 /* IPPROTO_??? */) = -1 EPERM (Operation not permitted) |
40 |
open("/sys/class/net", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = -1 EACCES (Permission denied) |
41 |
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3 |
42 |
--- {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x4} (Segmentation fault) --- |
43 |
+++ killed by SIGSEGV (core dumped) +++ |
44 |
Segmentation fault (core dumped) |
45 |
|
46 |
$ ls -l core |
47 |
-rw------- 1 powerman users 446464 Jan 28 00:59 core |
48 |
|
49 |
$ gdb |
50 |
(gdb) core core |
51 |
[New LWP 26950] |
52 |
Core was generated by `strace dumpcap'. |
53 |
Program terminated with signal 11, Segmentation fault. |
54 |
#0 0xa6dda422 in __kernel_vsyscall () |
55 |
(gdb) bt |
56 |
#0 0xa6dda422 in __kernel_vsyscall () |
57 |
#1 0xa6c946a6 in ?? () |
58 |
#2 0x1f69cd64 in ?? () |
59 |
#3 0x1f663179 in ?? () |
60 |
#4 0x0000000b in ?? () |
61 |
#5 0x00000000 in ?? () |
62 |
(gdb) |
63 |
|
64 |
Here is another way: |
65 |
|
66 |
$ gdb dumpcap |
67 |
(gdb) run |
68 |
Starting program: /usr/bin/dumpcap |
69 |
|
70 |
Program received signal SIGSEGV, Segmentation fault. |
71 |
0xab94e152 in ?? () |
72 |
(gdb) bt |
73 |
#0 0xab94e152 in ?? () |
74 |
#1 0xaba4c197 in ?? () |
75 |
#2 0xaba4fd99 in ?? () |
76 |
#3 0xaba51e37 in ?? () |
77 |
#4 0x16f4269d in get_interface_list_findalldevs (err=0xbdaff4a8, err_str=0xbdaff4a4) |
78 |
at capture-pcap-util.c:174 |
79 |
#5 0x16f409c0 in get_interface_list (err=0xbdaff4a8, err_str=0xbdaff4a4) |
80 |
at capture-pcap-util-unix.c:110 |
81 |
#6 0x16f469d2 in capture_interface_list (err=0xbdaff4a8, err_str=0xbdaff4a4) at dumpcap.c:797 |
82 |
#7 0x16f42345 in capture_opts_trim_iface (capture_opts=0x16f4e060, capture_device=0x0) |
83 |
at capture_opts.c:770 |
84 |
#8 0x16f476cd in main (argc=<optimized out>, argv=<optimized out>) at dumpcap.c:3850 |
85 |
(gdb) |
86 |
|
87 |
Is this enough, or I can do more? |
88 |
|
89 |
-- |
90 |
WBR, Alex. |