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

Improving log of old space limit error reporting #833

Merged

Conversation

tesonep
Copy link
Collaborator

@tesonep tesonep commented Jul 10, 2024

  • Adding a better message for old space limit

- Adding an origin message for handling the error of growing old space when a limit arrives
Copy link
Collaborator

@PalumboN PalumboN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lovely 🤩 ✍️ 💀

@akgrant43
Copy link
Contributor

Nice. This is the output of a small script that sets maxOldSpace to 1GB and then allocates memory until no space is left:

...
Allocated: 650.55 kB, size: 1.07 GB, loop: 0
Allocated: 804.91 kB, size: 1.07 GB, loop: 0
basicNew: ec: insufficient object memory
handleFailingBasicNew: will GC
2024-07-11 11:13:12 ERROR elease/build/vm-bindings-a01c3e16be26e412/out/generated/64/vm/src/cointerp.c:47482 - Could not allocate more memory while copying objects to OldSpace during GC. MaxOldSpaceSize reached.
2024-07-11 11:13:12 ERROR elease/build/vm-bindings-a01c3e16be26e412/out/extra/debug.c:38 - Could not allocate new object in the old space. It was not possible to allocate a new memory segment
2024-07-11 11:13:12 ERROR elease/build/vm-bindings-a01c3e16be26e412/out/extra/debug.c:39 - Aborting the execution of the VM

VM Error Thu Jul 11 11:13:12 2024


/home/alistair/gtvm/currentvm/bin/GlamorousToolkit-cli
PharoVM version:5.0-Pharo 10.2.0 built on Jan  1 1980 00:00:00 Compiler: 13.2.0 13.2.0 [Production Spur 64-bit VM]
Built from: CoInterpreter * VMMaker-tonel.1 uuid: ee786fa3-56d9-0d00-8c2f-255c0e489b04 Jan  1 1980
 With:StackToRegisterMappingCogit * VMMaker-tonel.1 uuid: ee786fa3-56d9-0d00-8c2f-255c0e489b04 Jan  1 1980
 Revision: v10.2.0-111-g910d9c9 - Commit: 910d9c9 - Date: 2024-07-11 10:45:11 +02:00

C stack backtrace & registers:
	rax 0x00000052 rbx 0x7f57ce1e91b0 rcx 0x00000115 rdx 0x7f50315950a0
	rdi 0x7f57cddf4420 rsi 0x7f57cddf4420 rbp 0x7f57ce1ed298 rsp 0x7f57cddf4420
	r8  0x00000006 r9  0x00000005 r10 0x7f57cddf44b8 r11 0x55f5384c7330
	r12 0x00000008 r13 0x000033f8 r14 0x360661920 r15 0x360661928
	rip 0x7f57ce1e3b94
*/home/alistair/gtvm/currentvm/bin/../lib/libPharoVMCore.so(printStatusAfterError+0x24)[0x7f57ce1e3b94]
/home/alistair/gtvm/currentvm/bin/../lib/libPharoVMCore.so(+0xd874c)[0x7f57ce1e374c]
/home/alistair/gtvm/currentvm/bin/../lib/libPharoVMCore.so(doReport+0xba)[0x7f57ce1e3a4a]
/home/alistair/gtvm/currentvm/bin/../lib/libPharoVMCore.so(printStatusAfterError+0x3d)[0x7f57ce1e3bad]
/home/alistair/gtvm/currentvm/bin/../lib/libPharoVMCore.so(error+0x53)[0x7f57ce1db933]
/home/alistair/gtvm/currentvm/bin/../lib/libPharoVMCore.so(+0x95d39)[0x7f57ce1a0d39]
/home/alistair/gtvm/currentvm/bin/../lib/libPharoVMCore.so(+0x95e0b)[0x7f57ce1a0e0b]
/home/alistair/gtvm/currentvm/bin/../lib/libPharoVMCore.so(+0x9613d)[0x7f57ce1a113d]
/home/alistair/gtvm/currentvm/bin/../lib/libPharoVMCore.so(+0x99a98)[0x7f57ce1a4a98]
/home/alistair/gtvm/currentvm/bin/../lib/libPharoVMCore.so(fullGC+0xa0)[0x7f57ce1c30d0]
/home/alistair/gtvm/currentvm/bin/../lib/libPharoVMCore.so(+0xb8763)[0x7f57ce1c3763]
/home/alistair/gtvm/currentvm/bin/../lib/libPharoVMCore.so(interpret+0x324)[0x7f57ce1cde54]
/home/alistair/gtvm/currentvm/bin/../lib/libPharoVMCore.so(+0xcad3d)[0x7f57ce1d5d3d]
/home/alistair/gtvm/currentvm/bin/../lib/libPharoVMCore.so(interpret+0x715f)[0x7f57ce1d4c8f]
/home/alistair/gtvm/currentvm/bin/GlamorousToolkit-cli(+0x159b15)[0x55f5384d6b15]
/home/alistair/gtvm/currentvm/bin/GlamorousToolkit-cli(+0x15af8d)[0x55f5384d7f8d]
/home/alistair/gtvm/currentvm/bin/GlamorousToolkit-cli(+0x15beef)[0x55f5384d8eef]
/home/alistair/gtvm/currentvm/bin/GlamorousToolkit-cli(+0x1e7085)[0x55f538564085]
/nix/store/dbcw19dshdwnxdv5q2g6wldj6syyvq7l-glibc-2.39-52/lib/libc.so.6(+0x8e272)[0x7f57cdea2272]
/nix/store/dbcw19dshdwnxdv5q2g6wldj6syyvq7l-glibc-2.39-52/lib/libc.so.6(+0x109dec)[0x7f57cdf1ddec]
[0x0]


All Smalltalk process stacks (active first):
Process      0x1001856f510 priority 40
       0x30000be28 I SmalltalkImage>garbageCollect 0x10000022ac8: a(n) SmalltalkImage
       0x30000be70 I ByteArray class(Behavior)>handleFailingBasicNew: 0x100000149f8: a(n) ByteArray class
       0x30000beb0 M ByteArray class(Behavior)>basicNew: 0x100000149f8: a(n) ByteArray class
       0x30000bee8 M ByteArray class(Behavior)>new: 0x100000149f8: a(n) ByteArray class
       0x30000bf30 M [] in AkgMaxOldSpaceStress>allocateOne 0x10020573560: a(n) AkgMaxOldSpaceStress
...

@guillep guillep merged commit 99d178d into pharo-project:pharo-10 Jul 15, 2024
1 of 2 checks passed
@guillep
Copy link
Member

guillep commented Jul 15, 2024

Thanks everybody!

@guillep guillep deleted the improving-log-of-oldSpaceLimit branch July 15, 2024 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants