Skip to content
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

stdout output is lost in memory pressure situations #52

Closed
benpicco opened this issue Jun 13, 2013 · 2 comments
Closed

stdout output is lost in memory pressure situations #52

benpicco opened this issue Jun 13, 2013 · 2 comments
Labels
State: won't fix State: The issue can not or will not be fixed Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Comments

@benpicco
Copy link
Contributor

When there is little to none free memory left, printf() messages are lost and truncated.
If not sufficient free memory becomes availiable, the program will simply not output anything anymore, but contiunes running. From the 'delay' between "memory being used up" and "no more log messages can be written" it seems like a preallocated buffer is used, when trying to allocate another buffer for printf in a low-memory situation, this fails and messages are cut off.
e.g. running test_malloc

2013-06-13 17:49:26,699 - INFO # Allocated 1024 Bytes at 0x0x7fe02c60, total 75336
2013-06-13 17:49:26,799 - INFO # Allocated 1024 Bytes at 0x0x7fe03068, total 76368
2013-06-13 17:49:26,899 - INFO # Allocated 1024 Bytes at 0x0x7fe03470, total 77400
2013-06-13 17:49:26,999 - INFO # Allocated 1024 Bytes at 0x0x7fe03878, total 78432
2013-06-13 17:49:27,089 - INFO # Free 1024 Bytes at 0x0x40002078, total 77416
2013-06-13 17:49:27,179 - INFO # Free 1024 Bytes at 0x0x40002490, total 76384
2013-06-13 17:49:27,284 - INFO # Free 1024 Bytes at 0x0x400028a8, total 75352
2013-06-13 17:49:27,374 - INFO # Free 1024 Bytes at 0x0x40002cc0, total 74320
2013-06-13 17:49:27,466 - INFO # Free 1024 Bytes at 0x0x400030d8, total 73288
2013-06-13 17:49:27,556 - INFO # Free 1024 Bytes at 0x0x400034f0, total 72256
2013-06-13 17:49:27,648 - INFO # Free 1024 Bytes at 0x0x40003908, total 71224
2013-06-13 17:49:27,744 - INFO # Free 1024 Bytes at 0x0x40003d20, total 70192
2013-06-13 17:49:27,836 - INFO # Free 1024 Bytes at 0x0x40004138, total 69160
2013-06-13 17:49:27,926 - INFO # Free 1024 Bytes at 0x0x40004550, total 68128
2013-06-13 17:49:28,016 - INFO # Free 1024 Bytes at 0x0x40004968, total 67096
2013-06-13 17:49:28,106 - INFO # Free 1024 Bytes at 0x0x40004d80, total 66064
2013-06-13 17:49:28,248 - INFO # Free 1024 Bytes at 0x0x4ocated 1024 Bytes at 0x0x40004958, total 26832
2013-06-13 17:49:28,348 - INFO # Allocated 1024 Bytes at 0x0x40004d70, total 27864
2013-06-13 17:49:28,448 - INFO # Allocated 1024 Bytes at 0x0x40005188, total 28896
2013-06-13 17:49:28,548 - INFO # Allocated 1024 Bytes at 0x0x400055a0, total 29928
2013-06-13 17:49:28,648 - INFO # Allocated 1024 Bytes at 0x0x400059b8, total 30960

(the exact point of the corruption differs with slightly different binaries, but is consistent when using the same binary)

@LudwigKnuepfer
Copy link
Member

Nothing RIOT can do to prevent this I'm afraid..

@OlegHahm OlegHahm added this to the FIX ME FIRST milestone Jun 3, 2014
@Kijewski
Copy link
Contributor

Close as wontfix.

nmeum added a commit to beduino-project/RIOT that referenced this issue Apr 2, 2017
nmeum added a commit to beduino-project/RIOT that referenced this issue Apr 2, 2017
Two small bug fixes

Closes RIOT-OS#52 and RIOT-OS#64

See merge request !31
eduazocar pushed a commit to eduazocar/RIOT that referenced this issue Jul 1, 2022
doc: doxygen  setup and docs deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
State: won't fix State: The issue can not or will not be fixed Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

No branches or pull requests

4 participants