Bug 975 - PulseView crashes when out of memory while loading/importin a file
Summary: PulseView crashes when out of memory while loading/importin a file
Status: RESOLVED FIXED
Alias: None
Product: PulseView
Classification: Unclassified
Component: Other (show other bugs)
Version: unreleased development snapshot
Hardware: All All
: Normal normal
Target Milestone: PulseView 0.5.0
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-09 13:20 CEST by Uwe Hermann
Modified: 2018-07-21 21:56 CEST (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Uwe Hermann 2017-06-09 13:20:18 CEST
IIRC this used to be caught by an "out of memory" popup instead of crashing, but the current installer crashes for me when loading a large .sr file (e.g. dcf77_1800s.sr) or importing a large .csv file, for example.
Comment 1 Soeren Apel 2017-06-10 00:02:11 CEST
Can you check if the kernel OOM killer killed PV when you encounter this?

The thing is that PV can now allocate as much memory as it wants because of the linux kernel's overcommit strategy. Only when PV actually fills it with sample data is when the OOM killer is triggered and shoots PV down for using memory it was told was available. This isn't really PV's fault imo, so until we have a memory limit internal to PV, we unfortunately can't avoid this.
Comment 2 Uwe Hermann 2017-06-10 15:20:14 CEST
My initial test was on Windows actually, but I'll also check on Linux and Mac OS X for some more data.
Comment 3 Uwe Hermann 2018-04-20 18:03:06 CEST
Still reproducible on Windows (32bit build, so RAM is pretty limited), PV will just crash.

On Linux the following appears in the console when RAM + swap are full:

terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc

The PV window stays around apparently, though, CPU load is pretty high etc.

There's no "out of memory" popup from PV itself.

To reproduce you can load any huuuge .sr file and if that's not enough open another additional session window and load it again, etc., until you're out of memory.
Comment 4 Uwe Hermann 2018-07-21 21:56:05 CEST
Fixed in 2c39cfe261f46ba4dd97a403a51e6c11893b6b0a, thanks!