Opened 2 years ago

Closed 23 months ago

#24086 closed defect (fixed)

consdiffmgr.c:637: consdiffmgr_find_diff_from: Non-fatal assertion !(ent->entry == NULL) failed

Reported by: cypherpunks Owned by: nickm
Priority: Medium Milestone: Tor: 0.3.1.x-final
Component: Core Tor/Tor Version: Tor: 0.3.2.2-alpha
Severity: Normal Keywords: 031-backport
Cc: Actual Points:
Parent ID: Points:
Reviewer: ahf Sponsor:

Description

found this in the logs (maybe the system was just running out of memory)

 tor_bug_occurred_(): Bug: ../src/or/consdiffmgr.c:637: consdiffmgr_find_diff_from: Non-fatal assertion !(ent->entry == NULL) failed. (on Tor 0.3.2.2-alpha )
 Bug: Non-fatal assertion !(ent->entry == NULL) failed in consdiffmgr_find_diff_from at ../src/or/consdiffmgr.c:637. Stack trace: (on Tor 0.3.2.2-alpha )
 Bug:     /usr/bin/tor(log_backtrace+0x44) [0x55f6dd5a54d4] (on Tor 0.3.2.2-alpha )
 Bug:     /usr/bin/tor(tor_bug_occurred_+0xb9) [0x55f6dd5c0619] (on Tor 0.3.2.2-alpha )
 Bug:     /usr/bin/tor(consdiffmgr_find_diff_from+0x20d) [0x55f6dd53cb9d] (on Tor 0.3.2.2-alpha )
 Bug:     /usr/bin/tor(+0x135793) [0x55f6dd557793] (on Tor 0.3.2.2-alpha )
 Bug:     /usr/bin/tor(connection_dir_process_inbuf+0x721) [0x55f6dd552651] (on Tor 0.3.2.2-alpha )
 Bug:     /usr/bin/tor(+0x10aa0e) [0x55f6dd52ca0e] (on Tor 0.3.2.2-alpha )
 Bug:     /usr/bin/tor(+0x50dae) [0x55f6dd472dae] (on Tor 0.3.2.2-alpha )
 Bug:     /usr/lib/x86_64-linux-gnu/libevent-2.0.so.5(event_base_loop+0x6a0) [0x7fd9b60b95a0] (on Tor 0.3.2.2-alpha )
 Bug:     /usr/bin/tor(do_main_loop+0x29d) [0x55f6dd473ead] (on Tor 0.3.2.2-alpha )
 Bug:     /usr/bin/tor(tor_main+0x1c25) [0x55f6dd4779b5] (on Tor 0.3.2.2-alpha )
 Bug:     /usr/bin/tor(main+0x19) [0x55f6dd46f649] (on Tor 0.3.2.2-alpha )
 Bug:     /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1) [0x7fd9b4b1b2b1] (on Tor 0.3.2.2-alpha )
 Bug:     /usr/bin/tor(_start+0x2a) [0x55f6dd46f69a] (on Tor 0.3.2.2-alpha )
 tor_bug_occurred_(): Bug: ../src/or/consdiffmgr.c:637: consdiffmgr_find_diff_from: Non-fatal assertion !(ent->entry == NULL) failed. (on Tor 0.3.2.2-alpha )
 Bug: Non-fatal assertion !(ent->entry == NULL) failed in consdiffmgr_find_diff_from at ../src/or/consdiffmgr.c:637. Stack trace: (on Tor 0.3.2.2-alpha )
 Bug:     /usr/bin/tor(log_backtrace+0x44) [0x55f6dd5a54d4] (on Tor 0.3.2.2-alpha )
 Bug:     /usr/bin/tor(tor_bug_occurred_+0xb9) [0x55f6dd5c0619] (on Tor 0.3.2.2-alpha )
 Bug:     /usr/bin/tor(consdiffmgr_find_diff_from+0x20d) [0x55f6dd53cb9d] (on Tor 0.3.2.2-alpha )
 Bug:     /usr/bin/tor(+0x135793) [0x55f6dd557793] (on Tor 0.3.2.2-alpha )
 Bug:     /usr/bin/tor(connection_dir_process_inbuf+0x721) [0x55f6dd552651] (on Tor 0.3.2.2-alpha )
 Bug:     /usr/bin/tor(+0x10aa0e) [0x55f6dd52ca0e] (on Tor 0.3.2.2-alpha )
 Bug:     /usr/bin/tor(+0x50dae) [0x55f6dd472dae] (on Tor 0.3.2.2-alpha )
 Bug:     /usr/lib/x86_64-linux-gnu/libevent-2.0.so.5(event_base_loop+0x6a0) [0x7fd9b60b95a0] (on Tor 0.3.2.2-alpha )
 Bug:     /usr/bin/tor(do_main_loop+0x29d) [0x55f6dd473ead] (on Tor 0.3.2.2-alpha )
 Bug:     /usr/bin/tor(tor_main+0x1c25) [0x55f6dd4779b5] (on Tor 0.3.2.2-alpha )
 Bug:     /usr/bin/tor(main+0x19) [0x55f6dd46f649] (on Tor 0.3.2.2-alpha )
 Bug:     /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1) [0x7fd9b4b1b2b1] (on Tor 0.3.2.2-alpha )
 Bug:     /usr/bin/tor(_start+0x2a) [0x55f6dd46f69a] (on Tor 0.3.2.2-alpha )
 Error from LZMA encoder: Unable to allocate memory (5).

Child Tickets

Change History (11)

comment:1 Changed 2 years ago by cypherpunks

and

 tor_bug_occurred_(): Bug: ../src/or/consdiffmgr.c:329: cdm_diff_ht_purge: Non-fatal assertion !((*diff)->entry == NULL) failed. (on Tor 0.3.2.2-alpha )
 Bug: Non-fatal assertion !((*diff)->entry == NULL) failed in cdm_diff_ht_purge at ../src/or/consdiffmgr.c:329. Stack trace: (on Tor 0.3.2.2-alpha )
 Bug:     /usr/bin/tor(log_backtrace+0x44) [0x558d300344d4] (on Tor 0.3.2.2-alpha )
 Bug:     /usr/bin/tor(tor_bug_occurred_+0xb9) [0x558d3004f619] (on Tor 0.3.2.2-alpha )
 Bug:     /usr/bin/tor(consdiffmgr_rescan+0xd14) [0x558d2ffcdcd4] (on Tor 0.3.2.2-alpha )
 Bug:     /usr/bin/tor(+0x5111f) [0x558d2ff0211f] (on Tor 0.3.2.2-alpha )
 Bug:     /usr/lib/x86_64-linux-gnu/libevent-2.0.so.5(event_base_loop+0x6a0) [0x7f24191425a0] (on Tor 0.3.2.2-alpha )
 Bug:     /usr/bin/tor(do_main_loop+0x29d) [0x558d2ff02ead] (on Tor 0.3.2.2-alpha )
 Bug:     /usr/bin/tor(tor_main+0x1c25) [0x558d2ff069b5] (on Tor 0.3.2.2-alpha )
 Bug:     /usr/bin/tor(main+0x19) [0x558d2fefe649] (on Tor 0.3.2.2-alpha )
 Bug:     /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1) [0x7f2417ba42b1] (on Tor 0.3.2.2-alpha )
 Bug:     /usr/bin/tor(_start+0x2a) [0x558d2fefe69a] (on Tor 0.3.2.2-alpha )
 tor_bug_occurred_(): Bug: ../src/or/consdiffmgr.c:329: cdm_diff_ht_purge: Non-fatal assertion !((*diff)->entry == NULL) failed. (on Tor 0.3.2.2-alpha )
 Bug: Non-fatal assertion !((*diff)->entry == NULL) failed in cdm_diff_ht_purge at ../src/or/consdiffmgr.c:329. Stack trace: (on Tor 0.3.2.2-alpha )
 Bug:     /usr/bin/tor(log_backtrace+0x44) [0x558d300344d4] (on Tor 0.3.2.2-alpha )
 Bug:     /usr/bin/tor(tor_bug_occurred_+0xb9) [0x558d3004f619] (on Tor 0.3.2.2-alpha )
 Bug:     /usr/bin/tor(consdiffmgr_rescan+0xd14) [0x558d2ffcdcd4] (on Tor 0.3.2.2-alpha )
 Bug:     /usr/bin/tor(+0x5111f) [0x558d2ff0211f] (on Tor 0.3.2.2-alpha )
 Bug:     /usr/lib/x86_64-linux-gnu/libevent-2.0.so.5(event_base_loop+0x6a0) [0x7f24191425a0] (on Tor 0.3.2.2-alpha )
 Bug:     /usr/bin/tor(do_main_loop+0x29d) [0x558d2ff02ead] (on Tor 0.3.2.2-alpha )
 Bug:     /usr/bin/tor(tor_main+0x1c25) [0x558d2ff069b5] (on Tor 0.3.2.2-alpha )
 Bug:     /usr/bin/tor(main+0x19) [0x558d2fefe649] (on Tor 0.3.2.2-alpha )
 Bug:     /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1) [0x7f2417ba42b1] (on Tor 0.3.2.2-alpha )
 Bug:     /usr/bin/tor(_start+0x2a) [0x558d2fefe69a] (on Tor 0.3.2.2-alpha )

comment:2 Changed 2 years ago by nickm

Keywords: 031-backport added
Milestone: Tor: 0.3.2.x-final

comment:3 Changed 2 years ago by nickm

Owner: set to nickm
Status: newaccepted

comment:4 Changed 2 years ago by nickm

Okay, I think I have a fix for this. The problem here is that we were mis-handling a partial success from a diff operation -- but that could happen if (for example) LZMA failed and the other compressors succeeded. (This seems to be happening here.)

I've got a patch for this in my branch bug24086_031.

comment:5 Changed 2 years ago by nickm

Status: acceptedneeds_review

comment:6 Changed 2 years ago by ahf

Reviewer: ahf

comment:7 Changed 2 years ago by ahf

Status: needs_reviewmerge_ready

68c21860e32ca04d77c2bfbf7576b96de5110f59 looks good.
3bb29dd707fbc825501c30ed9a6fe4aecdf4fd22 looks good.

LGTM.

comment:8 Changed 2 years ago by nickm

Milestone: Tor: 0.3.2.x-finalTor: 0.3.1.x-final

Merged to 0.3.2 and forward; marking for possible backport.

comment:9 Changed 23 months ago by r1610091651@…

Got the second one today on 3.1.9:

Dec 10 22:17:07.000 [warn] tor_bug_occurred_(): Bug: ../src/or/consdiffmgr.c:329: cdm_diff_ht_purge: Non-fatal assertion !((*diff)->entry == NULL) failed. (on Tor 0.3.1.9 )
Dec 10 22:17:07.000 [warn] Bug: Non-fatal assertion !((*diff)->entry == NULL) failed in cdm_diff_ht_purge at ../src/or/consdiffmgr.c:329. Stack trace: (on Tor 0.3.1.9 )
Dec 10 22:17:07.000 [warn] Bug: /usr/bin/tor(log_backtrace+0x54) [0x556e0088dc] (on Tor 0.3.1.9 )
Dec 10 22:17:07.000 [warn] Bug: /usr/bin/tor(tor_bug_occurred_+0xcc) [0x556e02335c] (on Tor 0.3.1.9 )
Dec 10 22:17:07.000 [warn] Bug: /usr/bin/tor(consdiffmgr_rescan+0xcc4) [0x556dfb7e14] (on Tor 0.3.1.9 )
Dec 10 22:17:07.000 [warn] Bug: /usr/bin/tor(+0x4ca3c) [0x556dee9a3c] (on Tor 0.3.1.9 )

Was the fix already backported on that version?

comment:10 Changed 23 months ago by nickm

No, not backported in 0.3.1.9. (I didn't want to backport it until it had received testing in 0.3.2.x, and when 0.3.1.9 came out, this fix hadn't yet appeared in a torbrowser release.)

I expect we'll backport this for 0.3.1.10

comment:11 Changed 23 months ago by nickm

Resolution: fixed
Status: merge_readyclosed

merged to 0.3.1!

Note: See TracTickets for help on using tickets.