On Tue, 5 Feb 2019 19:22:21 +0100 
=?UTF-8?B?TMOhc3psw7MgQsO2c3rDtnJtw6lueWkgKEdDUyk=?= <g...@debian.org> wrote:
> Control: tags -1 +unreproducible moreinfo
> 
> Hi James,
> 
> On Tue, Feb 5, 2019 at 6:09 PM James Henried <jhenrie...@netcom.com> wrote:
> > fetchmail has stopped working in version 6.4.0~beta4-2.
>  Which previous version did you use?
> 
> > Running the daemon gets the first mail in the queue delivered, but then it 
> > segfaults.
>  Please install fetchmail-dbgsym if it may give more information.
> 
> What happens if you stop the daemon and run it from the command line?
> What's the output if it still fails?
> Are you open to provide detailed log like the following produces?
> $ env LC_ALL=C fetchmail -v -v -v  --nodetach --nosyslog -b 2

I can reproduce it well if it's the same problem.
Here is your stack information, with minimal anonymization.

For me it's not crashing ASAP, it skips two messages with "bad header"
status and crashes upon encountering the first good message.

(gdb) bt
#0  pop3_delete (sock=<optimized out>, ctl=0x5555555b4db0, number=3) at 
pop3.c:1362
#1  0x00005555555669b0 in fetch_messages (msgsizes=0x55555559f480 <msgsizes>, 
transient_errors=<synthetic pointer>, 
    deletions=<synthetic pointer>, dispatches=<synthetic pointer>, 
fetches=<synthetic pointer>, maxfetch=1000, 
    count=<optimized out>, ctl=0x5555555b4db0, mailserver_socket=3) at 
driver.c:812
#2  do_session (ctl=ctl@entry=0x5555555b4db0, proto=proto@entry=0x55555559a200 
<pop3>, maxfetch=maxfetch@entry=1000)
    at driver.c:1435
#3  0x0000555555567df9 in do_protocol (ctl=0x5555555b4db0, proto=0x55555559a200 
<pop3>) at driver.c:1677
#4  0x000055555555fb48 in query_host (ctl=0x5555555b4db0) at fetchmail.c:1546
#5  0x000055555555a37b in main (argc=<optimized out>, argv=0x7fffffffe5d8) at 
fetchmail.c:793
(gdb) display ctl
1: ctl = (struct query *) 0x5555555b4db0
(gdb) display *ctl
2: *ctl = {server = {pollname = 0x5555555b4cf0 "MYSERVER", via = 0x0, akalist = 
0x0, localdomains = 0x0, protocol = 3, 
    service = 0x0, interval = 0, authenticate = 1, timeout = 300, envelope = 
0x0, envskip = 0, qvirtual = 0x0, 
    skip = 0 '\000', dns = 1 '\001', uidl = 0 '\000', sdps = 0 '\000', 
checkalias = 0 '\000', tracepolls = 0 '\000', 
    principal = 0x0, esmtp_name = 0x0, esmtp_password = 0x0, badheader = 
BHREJECT, interface = 0x0, monitor = 0x0, 
    monitor_io = 0, interface_pair = 0x0, plugin = 0x0, plugout = 0x0, 
base_protocol = 0x55555559a200 <pop3>, poll_count = 0, 
    queryname = 0x5555555b3f90 "MYSERVER", truename = 0x5555555b4020 
"MYSERVER", trueaddr = 0x5555555fcf50, 
    trueaddr_len = 16, lead_server = 0x0, esmtp_options = 3, workarounds = 0}, 
localnames = 0x5555555b4d50, wildcard = 0, 
  remotename = 0x5555555b4cd0 "ANON", password = 0x5555555b4d10 "ANON", 
mailboxes = 0x5555555b4080, 
  smtphunt = 0x5555555b4060, domainlist = 0x0, smtpaddress = 0x0, smtpname = 
0x0, antispam = 0x5555555b4d90, mda = 0x0, 
  bsmtp = 0x0, listener = 83 'S', preconnect = 0x0, postconnect = 0x0, keep = 0 
'\000', fetchall = 1 '\001', flush = 0 '\000', 
  limitflush = 0 '\000', rewrite = 1 '\001', stripcr = 0 '\000', forcecr = 0 
'\000', pass8bits = 0 '\000', 
  dropstatus = 0 '\000', dropdelivered = 0 '\000', mimedecode = 0 '\000', idle 
= 0 '\000', limit = 0, warnings = 3600, 
  fetchlimit = 0, fetchsizelimit = 100, fastuidl = 4, fastuidlcount = 0, 
batchlimit = 70, expunge = 1000, use_ssl = 1 '\001', 
  sslkey = 0x0, sslcert = 0x0, sslproto = 0x0, sslcertfile = 0x0, sslcertpath = 
0x0, sslcertck = 1 '\001', 
  sslcommonname = 0x0, sslfingerprint = 0x0, properties = 0x0, active = 1 
'\001', destaddr = 0x55555564c7e0 "localhost", 
  errcount = 0, authfailcount = 0, wehaveauthed = 1, wehavesentauthnote = 0, 
wedged = 0, 
  smtphost = 0x5555555b4040 "localhost", smtphostmode = 83 'S', smtp_socket = 
4, uid = 103, skipped = 0x0, oldsaved = {
    pat_root = 0x5555555b41c0, records = 0x5555555dbd00, records_max = 2048, 
records_next = 1888, num_ndx = {records = 0x0, 
      pos_0_value = 4294967295, end_value = 4294967295}}, newsaved = {pat_root 
= 0x0, records = 0x5555555b4130, 
    records_max = 16, records_next = 0, num_ndx = {records = 0x0, pos_0_value = 
4294967295, end_value = 4294967295}}, 
  lastdigest = '\000' <repeats 32 times>, folder = 0x0, mimemsg = 1, digest = 
'\000' <repeats 32 times>, next = 0x0}

Valgrind confirms:

==4368== Invalid write of size 4
==4368==    at 0x10DDDA: pop3_delete (pop3.c:1374)
==4368==    by 0x10DDDA: pop3_delete.cold.13 (pop3.c:1362)
==4368==    by 0x11A9AF: fetch_messages (driver.c:812)
==4368==    by 0x11A9AF: do_session (driver.c:1435)
==4368==    by 0x11BDF8: do_protocol (driver.c:1677)
==4368==    by 0x113B47: query_host (fetchmail.c:1546)
==4368==    by 0x10E37A: main (fetchmail.c:793)
==4368==  Address 0x14 is not stack'd, malloc'd or (recently) free'd
==4368== 
==4368== 
==4368== Process terminating with default action of signal 11 (SIGSEGV)
==4368==  Access not within mapped region at address 0x14
==4368==    at 0x10DDDA: pop3_delete (pop3.c:1374)
==4368==    by 0x10DDDA: pop3_delete.cold.13 (pop3.c:1362)
==4368==    by 0x11A9AF: fetch_messages (driver.c:812)
==4368==    by 0x11A9AF: do_session (driver.c:1435)
==4368==    by 0x11BDF8: do_protocol (driver.c:1677)
==4368==    by 0x113B47: query_host (fetchmail.c:1546)
==4368==    by 0x10E37A: main (fetchmail.c:793)
==4368==  If you believe this happened as a result of a stack
==4368==  overflow in your program's main thread (unlikely but
==4368==  possible), you can try to increase the size of the
==4368==  main thread stack using the --main-stacksize= flag.
==4368==  The main thread stack size used in this run was 8388608.
==4368== Invalid read of size 8
==4368==    at 0x4FC05A5: check_free (dlerror.c:188)
==4368==    by 0x4FC0AB1: free_key_mem (dlerror.c:221)
==4368==    by 0x4FC0AB1: __dlerror_main_freeres (dlerror.c:239)
==4368==    by 0x4F2EED1: __libc_freeres (in /lib/x86_64-linux-gnu/libc-2.28.so)
==4368==    by 0x482B19E: _vgnU_freeres (in 
/usr/lib/x86_64-linux-gnu/valgrind/vgpreload_core-amd64-linux.so)
==4368==    by 0x2: ???
==4368==  Address 0x50b9f58 is 12 bytes after a block of size 12 alloc'd
==4368==    at 0x483577F: malloc (in 
/usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==4368==    by 0x4C21D38: CRYPTO_zalloc (in 
/usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==4368==    by 0x4C1DF8D: ??? (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==4368==    by 0x4BFF01B: ERR_get_state (in 
/usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==4368==    by 0x4BFF178: ERR_clear_error (in 
/usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==4368==    by 0x4C1D708: ??? (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==4368==    by 0x4FAD936: __pthread_once_slow (pthread_once.c:116)
==4368==    by 0x4C86568: CRYPTO_THREAD_run_once (in 
/usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==4368==    by 0x4C1DEBB: OPENSSL_init_crypto (in 
/usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==4368==    by 0x4B8B01D: ??? (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==4368==    by 0x4C1D79F: ??? (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==4368==    by 0x4FAD936: __pthread_once_slow (pthread_once.c:116)
==4368== 
==4368== 
==4368== HEAP SUMMARY:
==4368==     in use at exit: 457,488 bytes in 9,853 blocks
==4368==   total heap usage: 13,593 allocs, 3,740 frees, 2,313,266 bytes 
allocated
==4368== 
==4368== LEAK SUMMARY:
==4368==    definitely lost: 0 bytes in 0 blocks
==4368==    indirectly lost: 0 bytes in 0 blocks
==4368==      possibly lost: 0 bytes in 0 blocks
==4368==    still reachable: 457,488 bytes in 9,853 blocks
==4368==         suppressed: 0 bytes in 0 blocks
==4368== Rerun with --leak-check=full to see details of leaked memory
==4368== 
==4368== For counts of detected and suppressed errors, rerun with: -v

Regards,
Eduard.
-- 
<miracee> jaja, irc lerne ich, wenn ich gross bin

Reply via email to