Opened 6 years ago

Closed 5 years ago

#10797 closed bug (fixed)

[HaikuDepot] crashed with no internet connection

Reported by: diver Owned by: stippi
Priority: normal Milestone: R1
Component: Applications/HaikuDepot Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All


hrev47167, gcc2 hybrid.

After several hours of uptime network connectivity might get lost in vbox.

I only noticed it when I launched HaikuDepot and it crashed. Had two crashes with somewhat different backtraces.

Attachments (4) (12.8 KB ) - added by diver 6 years ago. (12.0 KB ) - added by diver 6 years ago. (12.5 KB ) - added by diver 6 years ago.
LD_PRELOAD=/system/lib/ HaikuDepot (16.0 KB ) - added by diver 6 years ago.
LD_PRELOAD=/system/lib/ HaikuDepot

Download all attachments as: .zip

Change History (12)

comment:1 by stippi, 6 years ago

I also saw these random crashes as soon as HaikuDepot started using the network HTTP classes. These seem to be just the same kind of crashes I see in WebPositive all the time (more frequently on a quad code machine, much less frequently on a dual core machine). My suspicion is that the HTTP stuff has a bug that corrupts memory. Most often, it crashes in some BString memory management code. It is also possible that there is a bug in BString which is triggered by specific behavior in the HTTP code, but if there was a problem in BString, one would think it got exposed more often.

comment:2 by pulkomandy, 6 years ago

Reproducing this with libroot_debug would help locating the issue more precisely.

comment:3 by korli, 6 years ago

I personally saw KDLs in the net stack, just after HaikuDepot was started. No such crash with pkgman.

comment:4 by luroh, 6 years ago

During offline testing of the install-wifi-firmwares script, I noticed this crash and found a simple way to reproduce it fairly reliably:

  • Boot Haiku with either no network adapter attached, or the network cable unplugged
  • Start HaikuDepot and select Tools --> Refresh depots
  • Wait a while for HaikuDepot to crash (if it doesn't crash, try refreshing the depots again)

by diver, 6 years ago

LD_PRELOAD=/system/lib/ HaikuDepot

by diver, 6 years ago

LD_PRELOAD=/system/lib/ HaikuDepot

comment:5 by stippi, 6 years ago

Thanks for the traces. Two different traces point at memory corruption. Both in the code which uses the HTTP network kit stuff.

comment:6 by stippi, 5 years ago

After I reviewed the HTTP code and pointed out race conditions in the cookie and authentication code to pulkomandy, and after he fixed these, I have not had a single crash in HaikuDepot (not HTTP related or otherwise). Can this be closed?

in reply to:  6 comment:7 by luroh, 5 years ago

Replying to stippi:

Can this be closed?

Fwiw, I am no longer able to reproduce the crash.

comment:8 by diver, 5 years ago

Resolution: fixed
Status: newclosed

I haven't tested HaikuDepot with no internet connection but if it crashes again we can always reopen it :)

Note: See TracTickets for help on using tickets.