#59498 closed defect (fixed)
openssh @8.1p1_2: __NSCFString autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug
Reported by: | iefdev (Eric F) | Owned by: | Ionic (Mihai Moldovan) |
---|---|---|---|
Priority: | Low | Milestone: | |
Component: | ports | Version: | 2.6.2 |
Keywords: | Cc: | ||
Port: | openssh |
Description
Thanks! for the last commit (41d935f). :+1:
To complete the test with my test key, I added the key now.
The functionality is all ok, but the output is debug('ish) - it comes with some noise.
Adding the key:
$ ssh-add -K ~/.ssh/id_test objc[80665]: Object 0x7f8d79c2be20 of class __NSCFString autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug objc[80665]: Object 0x7f8d79c2c3f0 of class __NSCFString autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug objc[80665]: Object 0x7f8d79c2cc10 of class __NSCFDictionary autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug objc[80665]: Object 0x7f8d79c2d520 of class __NSCFString autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug objc[80665]: Object 0x7f8d79c2d4a0 of class __NSCFString autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug objc[80665]: Object 0x7f8d79c2d4d0 of class __NSCFString autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug objc[80665]: Object 0x7f8d79c2d590 of class __NSCFString autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug objc[80665]: Object 0x7f8d79c2d5f0 of class __NSCFString autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug objc[80665]: Object 0x7f8d79c2dae0 of class NSConcreteMutableData autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug Enter passphrase for ~/.ssh/id_test: objc[80665]: Object 0x7f8d7b800090 of class __NSCFString autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug objc[80665]: Object 0x7f8d7b800270 of class __NSCFString autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug objc[80665]: Object 0x7f8d7b800140 of class __NSCFDictionary autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug objc[80665]: Object 0x7f8d7b800820 of class __NSCFDictionary autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug objc[80665]: Object 0x7f8d7b8008e0 of class __NSCFString autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug objc[80665]: Object 0x7f8d7b800b40 of class __NSCFString autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug objc[80665]: Object 0x7f8d7b800b70 of class __NSCFString autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug objc[80665]: Object 0x7f8d7b8000c0 of class __NSCFString autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug objc[80665]: Object 0x7f8d7b8000f0 of class __NSCFString autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug objc[80665]: Object 0x7f8d7b800430 of class NSConcreteMutableData autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug objc[80665]: Object 0x7f8d79c4f5f0 of class NSConcreteData autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug objc[80665]: Object 0x7f8d79c37210 of class __NSCFDictionary autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug Identity added: ~/.ssh/id_test (Eric F :: 2019-10-26)
Deleting the key:
$ ssh-add -Kd ~/.ssh/id_test objc[80694]: Object 0x7fe528c2bbe0 of class __NSCFString autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug objc[80694]: Object 0x7fe528c2c270 of class __NSCFDictionary autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug objc[80694]: Object 0x7fe52aa07550 of class __NSCFData autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug Identity removed: ~/.ssh/id_test (Eric F :: 2019-10-26)
Bug? …or just noise?
Change History (6)
comment:1 Changed 5 years ago by Ionic (Mihai Moldovan)
Cc: | Ionic removed |
---|---|
Owner: | set to Ionic |
Priority: | Normal → Low |
Status: | new → accepted |
comment:2 Changed 5 years ago by iEFdev
I was thinking of the edits we made to the dictionary, etc - if it perhaps was related to that, but noise is ok (if it can be muted).
After seeing this: #59497 (there was no cc to you in that one), I thought perhaps some debug trigger maybe was added/activated (on purpose or just coincidentally) - since each line end with: … to debug
. If it's just noise, maybe it's just enough to turn the debug off if that's the case.
comment:3 Changed 5 years ago by Mihai Moldovan <ionic@…>
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
comment:4 follow-up: 5 Changed 5 years ago by Ionic (Mihai Moldovan)
Please see if that does anything beneficial (and if it even builds successfully).
I've tried to explain what is (possibly?) happening and that a memory leak in ssh-add
is pretty benign (mostly because it's a single application with a small process life time), but if this works and gets rid of the messages, even better.
comment:5 Changed 5 years ago by iEFdev
Replying to Ionic:
Please see if that does anything beneficial (and if it even builds successfully).
I've tried to explain what is (possibly?) happening and that a memory leak in
ssh-add
is pretty benign (mostly because it's a single application with a small process life time), but if this works and gets rid of the messages, even better.
Thanks! It built fine, and no noise. 👍 ✨
$ port installed openssh The following ports are currently installed: openssh @8.1p1_3+gsskex+kerberos5+ldns+xauth (active) $ ssh-add -K ~/.ssh/id_test Enter passphrase for ~/.ssh/id_test: Identity added: ~/.ssh/id_test (Eric F :: 2019-11-02) $ ssh-add -Kd ~/.ssh/id_test Identity removed: ~/.ssh/id_test (Eric F :: 2019-11-02)
OT: For the symlink… If it was renamed to security in 10.6+ - maybe something like this?:
platform darwin { # create link to /usr/include/pam on systems pre OS X 10.6. if {([vercmp ${os.major} 9] <= 0)} { pre-configure { xinstall -d ${workpath}/include file delete ${workpath}/include/security ln -s /usr/include/pam ${workpath}/include/security } } }
comment:6 Changed 5 years ago by Ionic (Mihai Moldovan)
I honestly just forgot about that. Will hopefully remember to get rid of it with the next revbump. The broken symlink is something very minor - it doesn't break building or usage.
Should be just noise, I guess.
In essence,
libobjc
complains about autorelease being used (typically after something goes out of scope) without an autorelease pool being available. Normally the ownership is transferred to that pool and the garbage collector clears it out periodically (that might not hold for ARC code, but 10.6 doesn't have ARC).The weird part is that Cocoa itself is supposed to install an autorelease pool in the main (but not other) threads and as far as I know
ssh-add
isn't even multi-threaded.We also don't link against Cocoa, so there's that.
Maybe I'll just need to add an autorelease pool for older systems (10.7 and below?), even though 10.7 should have full ARC support already...