-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
segfault on fetching from specific pop server #43
Comments
Is there a core file? Load it into gdb:
gdb fdm core
Then run bt full and show me the output.
You may need to do ulimit -c unlimited before running fdm.
…On 24 Jan 2018 2:09 am, "Gaetan Bisson" ***@***.***> wrote:
I'm running the latest git master and getting a segfault when fetching
mail from a specific pop server. Below is the output of fdm -a mana1 -vvv
fetch. The mana1 account is the one that exhibits this segfault. All is
fine on my other accounts.
version is: fdm 1.9, started at: Tue Jan 23 16:07:03 2018
running on: Linux 4.14.14-1-ARCH #1 SMP PREEMPT Sat Jan 20 08:49:12 UTC 2018 x86_64
host is: fugu fugu.vesath.org 0.0.0.0
home is: /home/bisson
loading configuration from /home/bisson/.fdm.conf
added account "stdin": fetch=stdin
added account "mochi": fetch=maildir "/mnt/mochi/home/bisson/Maildir"
added account "phare": fetch=imaps server "phare.normalesup.org" port imaps user "bisson" folders "INBOX"
added account "arch": fetch=imaps server "mail.archlinux.org" port imaps user "bisson" folders "INBOX"
added account "mana1": fetch=pop3 server "pop.mana.pf" port pop3 user "bisson"
added rule 0: matches=all lambda=0:maildir "~/var/sec/mail/spool"
configuration loaded
locking using: flock
options are: maximum-size=62914560, timeout=600, default-user="bisson", command-user="bisson", file-umask=077, queue-high=2, queue-low=1, strip-characters="\<>$%^&*|{}[]"'`;"
using tmp directory: /tmp
parent: started, pid is 8731
parent: 0 children, 0 dead children
parent: child 8733 (mana1) started
mana1: fetch started, pid 8733
mana1: user is 101
mana1: started processing
mana1: fetching
mana1: fetch loop start
mana1: calling fetch state (0x555bbc9a1fc0, flags 0x02)
mana1: fetch, again
mana1: fetch loop start
mana1: calling fetch state (0x555bbc9acef0, flags 0x02)
mana1: fetch, block
mana1: queued 0; blocked 0; flags 0x02
mana1: polling: 2, timeout=600000
mana1: fetch loop start
mana1: calling fetch state (0x555bbc9ae170, flags 0x02)
mana1: fetch, block
mana1: queued 0; blocked 0; flags 0x02
mana1: polling: 2, timeout=600000
mana1: fetch loop start
mana1: calling fetch state (0x555bbc9ae3f0, flags 0x02)
mana1: fetch, block
mana1: queued 0; blocked 0; flags 0x02
mana1: polling: 2, timeout=600000
mana1: fetch loop start
mana1: calling fetch state (0x555bbc9ae3f0, flags 0x02)
mana1: fetch, block
mana1: queued 0; blocked 0; flags 0x02
mana1: polling: 2, timeout=600000
mana1: fetch loop start
mana1: calling fetch state (0x555bbc9ae4b0, flags 0x02)
mana1: fetch, block
mana1: queued 0; blocked 0; flags 0x02
mana1: polling: 2, timeout=600000
mana1: fetch loop start
mana1: calling fetch state (0x555bbc9ae4b0, flags 0x02)
mana1: fetch, block
mana1: queued 0; blocked 0; flags 0x02
mana1: polling: 2, timeout=600000
mana1: fetch loop start
mana1: calling fetch state (0x555bbc9ae560, flags 0x02)
mana1: fetch, block
mana1: queued 0; blocked 0; flags 0x02
mana1: polling: 2, timeout=600000
mana1: fetch loop start
mana1: calling fetch state (0x555bbc9ae560, flags 0x02)
mana1: fetch, block
mana1: queued 0; blocked 0; flags 0x02
mana1: polling: 2, timeout=600000
mana1: fetch loop start
mana1: calling fetch state (0x555bbc9ae9b0, flags 0x02)
mana1: fetch, block
mana1: queued 0; blocked 0; flags 0x02
mana1: polling: 2, timeout=600000
mana1: fetch loop start
mana1: calling fetch state (0x555bbc9ae9b0, flags 0x02)
mana1: fetch, again
mana1: fetch loop start
mana1: calling fetch state (0x555bbc9adbe0, flags 0x02)
mana1: fetch, again
mana1: fetch loop start
mana1: calling fetch state (0x555bbc9aecc0, flags 0x02)
mana1: fetch, again
mana1: fetch loop start
mana1: calling fetch state (0x555bbc9adfa0, flags 0x02)
mana1: fetch, block
mana1: queued 0; blocked 0; flags 0x02
mana1: polling: 2, timeout=600000
mana1: fetch loop start
mana1: calling fetch state (0x555bbc9ae760, flags 0x02)
mana1: fetch, block
mana1: queued 0; blocked 0; flags 0x02
mana1: polling: 2, timeout=600000
mana1: fetch loop start
mana1: calling fetch state (0x555bbc9ae760, flags 0x02)
mana1: fetch, block
mana1: queued 0; blocked 0; flags 0x02
mana1: polling: 2, timeout=600000
mana1: fetch loop start
mana1: calling fetch state (0x555bbc9ad010, flags 0x02)
mana1: fetch, block
mana1: queued 0; blocked 0; flags 0x02
mana1: polling: 2, timeout=600000
mana1: fetch loop start
mana1: calling fetch state (0x555bbc9ad010, flags 0x02)
mana1: fetch, again
mana1: fetch loop start
mana1: calling fetch state (0x555bbc9ad1a0, flags 0x02)
mana1: fetch, block
mana1: queued 0; blocked 0; flags 0x02
mana1: polling: 2, timeout=600000
mana1: fetch loop start
mana1: calling fetch state (0x555bbc9ad1a0, flags 0x02)
mana1: fetch, block
mana1: queued 0; blocked 0; flags 0x02
mana1: polling: 2, timeout=600000
mana1: fetch loop start
mana1: calling fetch state (0x555bbc9ad1a0, flags 0x02)
mana1: fetch, mail
mana1: found 47 lines, 27 in body
mana1: message-id is: ***@***.***>
parent: 1 children, 0 dead children
parent: child 8733 socket error
parent: 1 children, 0 dead children
parent: waiting for children
parent: child 8733 got signal 11
parent: waiting for children
parent: waiting for children
parent: finished, total time 1.201 seconds
No mail gets written and dmesg says:
fdm[8733]: segfault at 20 ip 00007f68730baf37 sp 00007ffe2e058298 error 4 in libc-2.26.so[7f6872f64000+1ae000]
Any idea how I could solve or help investigate this?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#43>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AASkc42qzfiLscOa76MqqujWjKL55LKWks5tNpDlgaJpZM4RqnMG>
.
|
Here it is:
|
And here's my fdm.conf just in case. |
Can you rebuild fdm with "configure --enable-debug" (make clean then
configure, make) then reproduce and do the same gdb+bt thing?
…On Tue, Jan 23, 2018 at 10:36:23PM -0800, Gaetan Bisson wrote:
Here it is:
Core was generated by `./fdm -a mana1 -v fetch'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f2b7dbadf37 in __strlen_avx2 () from /usr/lib/libc.so.6
(gdb) bt
#0 0x00007f2b7dbadf37 in __strlen_avx2 () from /usr/lib/libc.so.6
#1 0x00007f2b7daa5ded in vfprintf () from /usr/lib/libc.so.6
#2 0x00007f2b7dacd632 in vsnprintf () from /usr/lib/libc.so.6
#3 0x00007f2b7daaca90 in snprintf () from /usr/lib/libc.so.6
#4 0x0000557d78c87aeb in account_get_method ()
#5 0x0000557d78c8813e in fetch_enqueue ()
#6 0x0000557d78c88bf1 in fetch_account ()
#7 0x0000557d78c88db3 in child_fetch ()
#8 0x0000557d78c89223 in child_start ()
#9 0x0000557d78c8514c in main ()
-
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
Link: #43 (comment)
|
There you go:
|
Oops, that was the short
|
Try this please:
diff --git a/child-fetch.c b/child-fetch.c
index f33b7a5..cf6ffd1 100644
--- a/child-fetch.c
+++ b/child-fetch.c
@@ -514,7 +514,7 @@ account_get_method(struct account *a)
{
struct fetch_imap_data *idata;
struct fetch_pop3_data *pdata;
- const SSL_CIPHER *cipher;
+ const SSL_CIPHER *cipher = NULL;
static char s[128];
char tmp[128];
@@ -526,8 +526,7 @@ account_get_method(struct account *a)
pdata = a->data;
if (pdata->io->ssl != NULL)
cipher = SSL_get_current_cipher(pdata->io->ssl);
- } else
- cipher = NULL;
+ }
if (cipher != NULL) {
snprintf(tmp, sizeof tmp, "version=%s %s %d bits",
SSL_CIPHER_get_version(cipher),
…On Wed, Jan 24, 2018 at 07:40:32AM +0000, Gaetan Bisson wrote:
Oops, that was the short bt, sorry. Here is the output of bt full:
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007efd93e41f37 in __strlen_avx2 () from /usr/lib/libc.so.6
(gdb) bt full
#0 0x00007efd93e41f37 in __strlen_avx2 () from /usr/lib/libc.so.6
No symbol table info available.
#1 0x00007efd93d39ded in vfprintf () from /usr/lib/libc.so.6
No symbol table info available.
#2 0x00007efd93d61632 in vsnprintf () from /usr/lib/libc.so.6
No symbol table info available.
#3 0x00007efd93d40a90 in snprintf () from /usr/lib/libc.so.6
No symbol table info available.
#4 0x0000560dad234d1b in account_get_method ***@***.***=0x560dae0a1980) at child-fetch.c:532
idata = <optimized out>
pdata = <optimized out>
cipher = <optimized out>
s = '\000' <repeats 127 times>
tmp = "version=unknown \030\301c\350\374\177\000\000`\024\n\224\375~\000\000\030\301\061\060\060\060\000\000\000\204\376\203j\227\344#`\344\v\256\rV\000\000\200\301c\350\374\177\000\000\200\000\000\000\000\000\000\000 \345\v\256\rV\000\000\204\031\n\256\rV\000\000`\344\v\256\rV\000\000\200\301c\350\374\177\000\000\346iU*\375~\000\000\200\000\000\000\000\000\000\000\000\204\376\203j\227\344#"
#5 0x0000560dad23536e in fetch_enqueue (a=0x560dae0a1980, pio=0x560dae0be460, m=0x560dae0be510) at child-fetch.c:655
size = 38
t = 1501319725
tptr = <optimized out>
hdr = <optimized out>
rtime = "Tue, 23 Jan 2018 21:35:21 -1000\000\260\000\f\256\rV\000\000\000\000\000\000\000\000\000\000\377\377", '\000' <repeats 15 times>, "\302c\350\374\177\000\000\020\345\v\256\rV\000\000\260e\n\256\rV\000\000L\005$\255\rV\000\000\200\031\n\256\rV\000\000o\265$\255\rV\000\000\300'\t\000\000\000\000\000\060\000\f\256\rV\000"
rhost = 0x560dae09ee30 "fugu.vesath.org"
total = "\243s%\255\rV\000\000\260e\n\256\rV\000"
n = 47
b = 28
mctx = <optimized out>
error = 1
tm = <optimized out>
m = 0x560dae0be510
a = 0x560dae0a1980
pio = 0x560dae0be460
#6 0x0000560dad235e21 in fetch_account ***@***.***=0x560dae0a1980, ***@***.***=0x560dae0be460, nflags=<optimized out>, ***@***.***=1516779321.247025) at child-fetch.c:435
msg = {id = 2904736384, type = 22029, size = 140724207338480, data = {error = -396114976, mail = {idx = 3898852120, tim = 6.8985196116437087e-310, tags = 0xa, shm = {
name = "px\374\224\000\000\000\000\370RF\255\rV\000\000\260\307c\350\374\177\000\000\200\343\v\256\rV\000\000@_#\255\rV\000\000\020\312c\350\374\177\000\000h\310c\350\374\177\000\000s\274Y*\375~\000\000\001", '\000' <repeats 15 times>, "\006\000\000\000\000\000\000\000\260\026I*\375~\000\000\020\307c\350\374\177\000\000\032.TH*\375~", '\000' <repeats 18 times>, "\260\307c\350\374\177\000\000\060\307c\350\374\177\000\000\000\000\000\000\000\000\000\000\200+\374\224\375~\000\000\020`I*\375~\000\000\360\303c\350\374\177\000\000\340\303c\350\374\177\000\000(\305c\350\001\000\000\000\000\061\377\224\375~\000\000\240\037\000\000"..., fd = -1795214248, data = 0x7efd94dd6f9f <_dl_lookup_symbol_x+335>, size = 6}, attach = 0x0, attach_built = -1795214248, base = 0x7ffce863c470 "", data = 0x7ffce863c460 '\377' <repeats 16 times>,
off = 6794719488, size = 139627591577856, space = 94616741631264, body = 18446744073709551615, wrapped = {list = 0xffffffffffffffff, num = 3460300800, space = 0}, wrapchar = 48 '0', rml = {valid = -1375041472, list = {{valid = -1375037616, so = 94616754488000,
eo = 94616754483600}, {valid = -1375038032, so = 94616754480832, eo = 94616754483056}, {valid = -1375048368, so = 94616754484240, eo = 94616754497936}, {valid = -1375041376, so = 94616754483504, eo = 94616754496400}, {valid = -1, so = 1099511627520, eo = 0}, {
valid = 0, so = 0, eo = 0}, {valid = 0, so = 0, eo = 0}, {valid = -2080472064, so = 0, eo = 94616754461060}, {valid = 247025, so = 2361183241434822607, eo = 3}, {valid = -1811295744, so = 0, eo = 6792556058}}}, decision = DECISION_NONE,
auxfree = 0x560dae0a1984, auxdata = 0x7ffce863c5d0}, account = 0x560dae0be460, actitem = 0x2, cmddata = 0x560dad235f40 <child_fetch>, uid = 2919897472, gid = 22029}}
msgp = <optimized out>
msgbuf = {buf = 0x7ffce863c2a0, len = 6774834520}
fctx = {state = 0x560dad24c310 <pop3_state_next>, flags = 2, mail = 0x560dae0be510, llen = 256, lbuf = 0x560dae0a65b0 "."}
cache = <optimized out>
iol = {list = 0x560dae0c1950, num = 2, space = 80}
aborted = 0
complete = <optimized out>
holding = 0
timeout = <optimized out>
__func__ = "fetch_account"
#7 0x0000560dad235fe3 in child_fetch (child=<optimized out>, pio=0x560dae0be460) at child-fetch.c:114
data = <optimized out>
op = FDMOP_FETCH
a = 0x560dae0a1980
msg = {id = 0, type = MSG_ACTION, size = 0, data = {error = 0, mail = {idx = 0, tim = 0, tags = 0x0, shm = {name = '\000' <repeats 192 times>, "\002", '\000' <repeats 15 times>..., fd = 0, data = 0x0, size = 0}, attach = 0x0, attach_built = 0, base = 0x0, data = 0x0,
off = 0, size = 0, space = 0, body = 0, wrapped = {list = 0x0, num = 0, space = 18446744073709551615}, wrapchar = 0 '\000', rml = {valid = 0, list = {{valid = 0, so = 0, eo = 0}, {valid = 0, so = 7, eo = 4402341478448}, {valid = 7, so = 0, eo = 16384}, {
valid = -1375080440, so = 16432, eo = 0}, {valid = -80, so = 256, eo = 1305670058098}, {valid = 32, so = 4, eo = 489626271867}, {valid = 0, so = 511101108348, eo = 32}, {valid = 1023, so = 16384, eo = 18446744073709551536}, {valid = -1390052237,
so = 94616739340096, eo = 140724207340048}, {valid = -1814637837, so = 16384, eo = 94616754578656}}}, decision = DECISION_NONE, auxfree = 0x560dad24f4de <xmalloc+14>, auxdata = 0x802}, account = 0x560dad233628 <buffer_create+40>, actitem = 0x560dad257c73,
cmddata = 0x560dae0be460, uid = 4, gid = 0}}
error = <optimized out>
flags = <optimized out>
tim = 1516779321.247025
__func__ = "child_fetch"
#8 0x0000560dad236453 in child_start (children=0x7ffce863ca10, uid=0, gid=0, start=0x560dad235f40 <child_fetch>, msg=<optimized out>, data=0x560dae0be380, parent=0x0) at child.c:133
child = 0x560dae0be3a0
childp = <optimized out>
fds = {3, 4}
n = <optimized out>
i = <optimized out>
io = 0x560dae0be460
__func__ = "child_start"
#9 0x0000560dad23214c in main (argc=<optimized out>, argv=<optimized out>) at fdm.c:765
opt = <optimized out>
lockfd = <optimized out>
status = 0
res = 0
i = 0
op = FDMOP_FETCH
proxy = <optimized out>
s = <optimized out>
tmp = "maximum-size=62914560, timeout=600, default-user=\"bisson\", command-user=\"bisson\", file-umask=077, queue-high=2, queue-low=1, strip-characters=\"\\<>$%^&*|{}[]\"'`;\"\000 ", '\000' <repeats 4406 times>...
ptr = <optimized out>
lock = 0x560dae09f890 "/home/bisson/.fdm.lock"
user = <optimized out>
home = <optimized out>
used = 0
un = {sysname = "Linux", '\000' <repeats 59 times>, nodename = "fugu", '\000' <repeats 60 times>, release = "4.14.14-1-ARCH", '\000' <repeats 50 times>, version = "#1 SMP PREEMPT Sat Jan 20 08:49:12 UTC 2018", '\000' <repeats 21 times>,
machine = "x86_64", '\000' <repeats 58 times>, domainname = "(none)", '\000' <repeats 58 times>}
pw = <optimized out>
sb = {st_dev = 47, st_ino = 9306571, st_nlink = 1, st_mode = 33152, st_uid = 101, st_gid = 100, __pad0 = 0, st_rdev = 0, st_size = 538, st_blksize = 4096, st_blocks = 8, st_atim = {tv_sec = 1516779171, tv_nsec = 323267399}, st_mtim = {tv_sec = 1516775960,
tv_nsec = 84813851}, st_ctim = {tv_sec = 1516779170, tv_nsec = 279823970}, __glibc_reserved = {0, 0, 0}}
tt = 1516779321
a = 0x560dae0a1980
actaq = {tqh_first = 0x0, tqh_last = 0x7ffce863c9f0}
pid = <optimized out>
children = {list = 0x0, num = 0, space = 0}
dead_children = {list = 0x0, num = 0, space = 0}
child = <optimized out>
dead_io = 0x0
iol = {list = 0x0, num = <optimized out>, space = 0}
tim = 1516779321.246613
act = {__sigaction_handler = {sa_handler = 0x560dad23c020 <sighandler>, sa_sigaction = 0x560dad23c020 <sighandler>}, sa_mask = {__val = {82434, 0 <repeats 15 times>}}, sa_flags = 268435456, sa_restorer = 0x0}
msg = {id = 0, type = MSG_ACTION, size = 0, data = {error = 0, mail = {idx = 0, tim = 0, tags = 0x0, shm = {name = '\000' <repeats 254 times>, fd = 0, data = 0x0, size = 0}, attach = 0x0, attach_built = 0, base = 0x0, data = 0x0, off = 0, size = 0, space = 0, body = 0,
wrapped = {list = 0x0, num = 0, space = 0}, wrapchar = 0 '\000', rml = {valid = 0, list = {{valid = 0, so = 0, eo = 0}, {valid = 0, so = 0, eo = 0}, {valid = 0, so = 0, eo = 0}, {valid = 0, so = 0, eo = 0}, {valid = 0, so = 0, eo = 0}, {valid = 0, so = 0, eo = 0}, {
valid = 0, so = 0, eo = 0}, {valid = 0, so = 0, eo = 0}, {valid = 0, so = 0, eo = 0}, {valid = 0, so = 0, eo = 0}}}, decision = DECISION_NONE, auxfree = 0x0, auxdata = 0x0}, account = 0x0, actitem = 0x0, cmddata = 0x0, uid = 0, gid = 0}}
msgbuf = {buf = 0x0, len = 0}
off = <optimized out>
macros = {list = 0x0, num = 0, space = 0}
cfd = <optimized out>
ud = <optimized out>
r = <optimized out>
t = <optimized out>
cache = <optimized out>
__func__ = "main"
-
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
Link: #43 (comment)
|
This fixes my problem. Thanks so much! |
Great! applied thanks |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm running the latest git master and getting a segfault when fetching mail from a specific pop server. Below is the output of
fdm -a mana1 -vvv fetch
. The mana1 account is the one that exhibits this segfault. All is fine on my other accounts.No mail gets written and dmesg says:
Any idea how I could solve or help investigate this?
The text was updated successfully, but these errors were encountered: