Subject: Re: bug#33135: 27.0.50; (make-thread) TRAMP interactive freeze macOS 10.14

From: Christian Johansson <[email-masked]>
Date: Tue, 6 Nov 2018 18:50:30 +0100

I was wrong, interactive threaded tramp over ange-ftp on macos doesn’t work. I have got more crashes lately after I updated branch, not sure if errors help but here are some:

 ;; Opening remote file 
emacs(16737,0x700004306000) malloc: *** error for object 0x11cb50885: pointer being freed was not allocated emacs(16737,0x111d105c0) malloc: *** error for object 0x7ffeefbfb610: pointer being freed was not allocated emacs(16737,0x700004306000) malloc: *** set a breakpoint in malloc_error_break to debug emacs(16737,0x111d105c0) malloc: *** set a breakpoint in malloc_error_break to debug Fatal error 6: Abort trapAbort trap: 6 logout Saving session... ...saving history...truncating history files... ...completed.

;; Renaming file over SSH via tramp 
objc[40791]: Invalid or prematurely-freed autorelease pool 0x10200b1c0. Fatal error 6: Abort trapAbort trap: 6 

 ;; another local sudo
emacs(41111,0x70000c892000) malloc: *** error for object 0x70000d093530: pointer being freed was not allocated emacs(41111,0x70000c892000) malloc: *** set a breakpoint in malloc_error_break to debug Fatal error 4: Illegal instructionAbort trap: 6 

;; another remote dired over SSH
emacs(40323,0x1181f95c0) malloc: *** error for object 0x103337305: pointer being freed was not allocated emacs(40323,0x1181f95c0) malloc: *** set a breakpoint in malloc_error_break to debug

> 5 nov. 2018 kl. 16:39 skrev Christian Johansson <[email-masked]>:
> 
> Alright, I’ll see if I can get the error again. I only got it like 2 times in 8 hours so it’s not frequent.
> 
> I tried user-interaction via threaded ange-ftp  tramp on macOS and it seems to work on your branch. I will try it a bit more this week.
> 
> Regards
> Christian
> 
>> 5 nov. 2018 kl. 14:49 skrev Michael Albinus <[email-masked]>:
>> 
>> Christian Johansson <[email-masked]> writes:
>> 
>>> Hi Michael
>> 
>> Hi Christian,
>> 
>>> I haven't experienced a single crash since I started using your
>>> threaded tramp branch but I sometimes get errors like this, but it
>>> doesn't make Emacs crash, I can just retry same operation and it will
>>> work. It seems like sometimes a thread is busy and Emacs tries to
>>> access it in some way and this error occurs, I have replaced sensitive
>>> information with --- below
>>> 
>>> Debugger entered--Lisp error: (error "Attempt to accept output from
>>> process *ftp ---...")
>>>  accept-process-output(#<process *ftp ---@---*>)
>>>  ange-ftp-wait-not-busy(#<process *ftp ---@---*>)
>>>  ange-ftp-raw-send-cmd(#<process *ftp ---@---*> "type ascii" nil
>>> (#f(compiled-function (result line host user cmd msg cont nowait)
>>> #<bytecode 0x4ffee879>) "---" "---" "type ascii" nil nil nil) nil)
>> 
>> Looks like the ange-ftp process is not assigned to the proper thread. As
>> said, ange-ftp is a special case, it wasn't handled yet.
>> 
>> I've pushed a fix to the feature/tramp-thread-safe branch; should work
>> now. Could you pls retest?
>> 
>>> I haven't tried threaded tramp that requires user-interaction yet
>>> though since I got ~/.authinfo.gpg working with ange-ftp, I'll see if
>>> I can test that this week
>> 
>> Likely, this won't work. Nobody has provided a fix for this problem, yet.
>> 
>>> Regards
>>> Christian
>> 
>> Best regards, Michael.