k9s icon indicating copy to clipboard operation
k9s copied to clipboard

MallocStackLogging: can't turn off malloc stack logging because it was not enabled

Open Shaokun-X opened this issue 1 year ago • 7 comments




Describe the bug If I leave k9s running for a while, lines like MallocStackLogging: can't turn off malloc stack logging because it was not enabled. will start to appear here and there, usually in the middle of pod list or after CPU/MEM labels in the header

To Reproduce Not sure how to reproduce, I have the impression that it is likely to happen when I lock and unlock my laptop

Historical Documents Sorry nothing useful I found in the logs

Expected behavior The lines stopping appearing

Screenshots image

Versions (please complete the following information):

  • OS: macOS Sonoma 14.5 23F79 x86_64
  • K9s: v0.32.5
  • K8s: v1.28.9-eks-036c24b

Shaokun-X avatar Jun 26 '24 10:06 Shaokun-X

This looks like it could be a problem with macOS or the builtin terminal, I can't reproduce it in iTerm2

wjiec avatar Jun 27 '24 02:06 wjiec

I have the same issue using Iterm2 OS: macOS Sonoma 14.5 23F79 ARM (m2) iTerm2 Build 3.5.2 K9s Rev: v0.32.5 K8s Rev: v1.28.9-eks-036c24b

eserden avatar Jun 29 '24 08:06 eserden

I find this issue in several repos and no one has really a clue. But seems related to macOS Sonoma and ARM. Examples: https://github.com/withfig/fig/issues/2660 https://github.com/easydiffusion/easydiffusion/issues/1551 Both issues are open since August last year.

mpas97 avatar Jun 29 '24 17:06 mpas97

having the same issue with R : rsession-arm64(41946) MallocStackLogging: can't turn off malloc stack logging because it was not enabled.

scilexenko avatar Aug 05 '24 10:08 scilexenko

Currently experiencing the same issue with my flutter application

4cyberlord avatar Oct 05 '24 04:10 4cyberlord

I'm also experiencing the same issue

chamodshehanka avatar Oct 13 '24 13:10 chamodshehanka

I experience this as well. This is usually when I have a PWSH session running for several hours.

timothydilbert avatar Oct 16 '24 21:10 timothydilbert

I ranexport MallocStackLoggingNoCompact=1 in the terminal and it seemed to fix the problem.

I am running OS: macOS Sonoma 14.6.1

Dele-Oyelese avatar Oct 31 '24 19:10 Dele-Oyelese

same issue for me. Looks like its occurring in the cursor terminal

handlerda avatar Dec 11 '24 02:12 handlerda

pnpm pzsh (qterm)(51023) MallocStackLogging: can't turn off malloc stack logging because it was not enabled.

After mac sleep in my project terminal.

uigywnkiub avatar Dec 25 '24 07:12 uigywnkiub

The MallocStackLogging was resolved after I upgraded minikube on my mac which is running Sequoia 15.2.

If you installed minikube using Homebrew, you can upgrade it with the following command:

brew upgrade minikube

rehmanz avatar Jan 21 '25 03:01 rehmanz

This looks like it could be a problem with macOS or the builtin terminal, I can't reproduce it in iTerm2

Idk if this is helpful at all but I am in fact experiencing this in iTerm 2 right now. I'm running Sequoia 15.1 (24B83), iTerm 2 Build 3.5.11. I've had k9s running for quite some time (roughly 24 hrs, if not more?) and still going, the error popped up where the "border" for the selection window is/would be, below the hardware stats. Resizing the iTerm 2 window made the error disappear though. Can't find any entry for this in the k9s.log file though.

das-nagnag avatar Jan 28 '25 12:01 das-nagnag

I ranexport MallocStackLoggingNoCompact=1 in the terminal and it seemed to fix the problem.

I am running OS: macOS Sonoma 14.6.1

This might lead to a bigger problem, if I look at the following trace -

git(46004) MallocStackLogging: stack logging compaction turned off; size of log files on disk can increase rapidly
git(46004) MallocStackLogging: stack logs being written to /private/tmp/stack-logs.46004.10285c000.git.kY3THH.index
git(46004) MallocStackLogging: recording malloc and VM allocation stacks to disk using standard recorder
git(46004) MallocStackLogging: stack logs deleted from /private/tmp/stack-logs.46004.10285c000.git.kY3THH.index
tail(46007) MallocStackLogging: could not tag MSL-related memory as no_footprint, so those pages will be included in process footprint - (null)
tail(46007) MallocStackLogging: stack logging compaction turned off; size of log files on disk can increase rapidly # This could be a problem
tail(46007) MallocStackLogging: stack logs being written to /private/tmp/stack-logs.46007.102be4000.tail.bNsLmP.index
tail(46007) MallocStackLogging: recording malloc and VM allocation stacks to disk using standard recorder

kunaljubce avatar Apr 23 '25 04:04 kunaljubce

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Jun 12 '25 02:06 github-actions[bot]

Got the same error after running the command below, right after it tried caching finalised dependency

Command:

dart run build_runner build --delete-conflicting-outputs

Error:

[INFO] Running build completed, took 8m 49s
[INFO] Caching finalized dependency graph completed, took 15.3s
[INFO] Succeeded after 9m 38s with 2891 outputs (14112 actions)
dart(79877) MallocStackLogging: can't turn off malloc stack logging because it was not enabled.

glunaTractian avatar Aug 07 '25 13:08 glunaTractian

I just had this happen to me and I think the reason this happens is that the computer's running out of memory. I had a couple processes taking up all my RAM and I had like 30 GB of swap and it kept happening.

etiennebarrie avatar Aug 08 '25 10:08 etiennebarrie