Bug#1050685: elpa-debian-el: Error when using debian-bug on certain binary package: (wrong-type-argument processp nil)
Control: tags -1 pending Hey Manphiz, Manphiz writes: > Hi Amin, > > Amin Bandali writes: > >> Hiya, >> >> Manphiz writes: >> >>> Manphiz writes: >>> Another finding is that in 28.x, if the term buffer have any further questions to ask, debian-bug seems to consider the process stuck and would just ignore everything and proceed. In 29.x however, the term buffer seems to be able to accept user input and can process the output accordingly - even if the script requires sudo and prompt for password, and debian-bug can properly include the output in the generated email for bug report. So with the merge request[4] it would instead skip all potential additional information unfortunately. >>> >>> Actually 28.x also works for user inputs if running term-exec without my >>> problematic hooks so yeah! >>> As we do want to handle process termination better, while trying to keep process from failing, I think temporarily disable term-exec-hook when processing the output and restore after the report is generated should probably work in most cases. Just wondering whether this is acceptable in the process of debian-bug? >>> >>> Forgot to mention that this is implemented as the 2nd commit in the >>> MR[4] and tested on bookworm and trixie to be working. >>> [4] https://salsa.debian.org/emacsen-team/debian-el/-/merge_requests/11 >> >> Thank you for the patch. :-) This seems like a reasonable fix to me, >> and if David has no comments or objections I'd be happy to merge it >> in the coming days. >> >> Quick request: would you please amend your patch/MR to add a >> debian/changelog entry for the change(s)? It would be good to >> do a new upload soon, and it'd be nice to have debian/changelog >> in tiptop shape for that. >> >> Thanks, >> -a > > Thanks for the review! I've pushed another commit adding the changelog > entries, and changed some of the commit message to be consistent, so > please force pull if you want to test again. Would definitely look > forward to hearing from David as well. Cheers; and thanks, I've merged the MR now! > P.S. I'm also testing some patches to fix the comp warnings and > hopefully can be included in the next upload. Will send another merge > request when ready. ACK, I'll rebase and review that one as well. Thanks, -a signature.asc Description: PGP signature
Bug#1050685: elpa-debian-el: Error when using debian-bug on certain binary package: (wrong-type-argument processp nil)
Hi Amin, Amin Bandali writes: > Hiya, > > Manphiz writes: > >> Manphiz writes: >> >>> Another finding is that in 28.x, if the term buffer have any further >>> questions to ask, debian-bug seems to consider the process stuck and >>> would just ignore everything and proceed. In 29.x however, the term >>> buffer seems to be able to accept user input and can process the output >>> accordingly - even if the script requires sudo and prompt for password, >>> and debian-bug can properly include the output in the generated email >>> for bug report. So with the merge request[4] it would instead skip all >>> potential additional information unfortunately. >>> >> >> Actually 28.x also works for user inputs if running term-exec without my >> problematic hooks so yeah! >> >>> As we do want to handle process termination better, while trying to keep >>> process from failing, I think temporarily disable term-exec-hook when >>> processing the output and restore after the report is generated should >>> probably work in most cases. Just wondering whether this is acceptable >>> in the process of debian-bug? >>> >> >> Forgot to mention that this is implemented as the 2nd commit in the >> MR[4] and tested on bookworm and trixie to be working. >> >>> [4] https://salsa.debian.org/emacsen-team/debian-el/-/merge_requests/11 > > Thank you for the patch. :-) This seems like a reasonable fix to me, > and if David has no comments or objections I'd be happy to merge it > in the coming days. > > Quick request: would you please amend your patch/MR to add a > debian/changelog entry for the change(s)? It would be good to > do a new upload soon, and it'd be nice to have debian/changelog > in tiptop shape for that. > > Thanks, > -a Thanks for the review! I've pushed another commit adding the changelog entries, and changed some of the commit message to be consistent, so please force pull if you want to test again. Would definitely look forward to hearing from David as well. P.S. I'm also testing some patches to fix the comp warnings and hopefully can be included in the next upload. Will send another merge request when ready. -- Xiyue Deng signature.asc Description: PGP signature
Bug#1050685: elpa-debian-el: Error when using debian-bug on certain binary package: (wrong-type-argument processp nil)
Hiya, Manphiz writes: > Manphiz writes: > >> Another finding is that in 28.x, if the term buffer have any further >> questions to ask, debian-bug seems to consider the process stuck and >> would just ignore everything and proceed. In 29.x however, the term >> buffer seems to be able to accept user input and can process the output >> accordingly - even if the script requires sudo and prompt for password, >> and debian-bug can properly include the output in the generated email >> for bug report. So with the merge request[4] it would instead skip all >> potential additional information unfortunately. >> > > Actually 28.x also works for user inputs if running term-exec without my > problematic hooks so yeah! > >> As we do want to handle process termination better, while trying to keep >> process from failing, I think temporarily disable term-exec-hook when >> processing the output and restore after the report is generated should >> probably work in most cases. Just wondering whether this is acceptable >> in the process of debian-bug? >> > > Forgot to mention that this is implemented as the 2nd commit in the > MR[4] and tested on bookworm and trixie to be working. > >> [4] https://salsa.debian.org/emacsen-team/debian-el/-/merge_requests/11 Thank you for the patch. :-) This seems like a reasonable fix to me, and if David has no comments or objections I'd be happy to merge it in the coming days. Quick request: would you please amend your patch/MR to add a debian/changelog entry for the change(s)? It would be good to do a new upload soon, and it'd be nice to have debian/changelog in tiptop shape for that. Thanks, -a
Bug#1050685: elpa-debian-el: Error when using debian-bug on certain binary package: (wrong-type-argument processp nil)
Manphiz writes: > Another finding is that in 28.x, if the term buffer have any further > questions to ask, debian-bug seems to consider the process stuck and > would just ignore everything and proceed. In 29.x however, the term > buffer seems to be able to accept user input and can process the output > accordingly - even if the script requires sudo and prompt for password, > and debian-bug can properly include the output in the generated email > for bug report. So with the merge request[4] it would instead skip all > potential additional information unfortunately. > Actually 28.x also works for user inputs if running term-exec without my problematic hooks so yeah! > As we do want to handle process termination better, while trying to keep > process from failing, I think temporarily disable term-exec-hook when > processing the output and restore after the report is generated should > probably work in most cases. Just wondering whether this is acceptable > in the process of debian-bug? > Forgot to mention that this is implemented as the 2nd commit in the MR[4] and tested on bookworm and trixie to be working. > [4] https://salsa.debian.org/emacsen-team/debian-el/-/merge_requests/11 -- Manphiz
Bug#1050685: elpa-debian-el: Error when using debian-bug on certain binary package: (wrong-type-argument processp nil)
tag -1 - unreproducible thanks David Bremner writes: > Manphiz writes: > >> Hmm, indeed I cannot reproduce this with "emacs -Q" either. Will see >> what could have caused this. Any tips on debugging? > > The only thing I can think of is to bisect the packages you have > enabled/loaded. Finally got some time to debug this. So it turns out that these lines[1] that tries to run "debian-bug-script" may fail before debian-bug tries to get the process status, which results in bug-script-process being nil. As for why the script may fail, in my case, the package I tried to reportbug on - linux-image-6.4.0-3-amd64 - has some custom logic that will ask additional questions to gather more information, such as whether to include dmesg, whether to include network interface info, etc., which will wait for a user input before proceeding. In the meantime, I have installed with-editor which will try to export a custom EDITOR envvar in term-exec-hook as suggested[2], and if the terminal is waiting a user input, it will cause the process to fail due to the command from with-editor. (As a possible cause has been found I'm taking the liberty to remove the unreproducible tag, even though it is not cause by debian-bug itself.) So in this case, it was indeed an external addon that triggered this error as David said. However, as the comment indicated[3], it should properly handle process termination, or any addon that tries to manipulate a term process may cause debian-bug to fail. I have prepared a merge request[4] trying to handle process termination as suggested but in quite a crude way, so any suggestion is appreciated.. Another finding is that in 28.x, if the term buffer have any further questions to ask, debian-bug seems to consider the process stuck and would just ignore everything and proceed. In 29.x however, the term buffer seems to be able to accept user input and can process the output accordingly - even if the script requires sudo and prompt for password, and debian-bug can properly include the output in the generated email for bug report. So with the merge request[4] it would instead skip all potential additional information unfortunately. As we do want to handle process termination better, while trying to keep process from failing, I think temporarily disable term-exec-hook when processing the output and restore after the report is generated should probably work in most cases. Just wondering whether this is acceptable in the process of debian-bug? [1] https://salsa.debian.org/manphiz/debian-el/-/blob/master/debian-bug.el#L892-893 [2] https://gitlab.com/xiyueden/emacs.d/-/blob/master/init.el?ref_type=heads#L460-463 [3] https://salsa.debian.org/manphiz/debian-el/-/blob/master/debian-bug.el#L897 [4] https://salsa.debian.org/emacsen-team/debian-el/-/merge_requests/11 -- Manphiz
Bug#1050685: elpa-debian-el: Error when using debian-bug on certain binary package: (wrong-type-argument processp nil)
Manphiz writes: > Hmm, indeed I cannot reproduce this with "emacs -Q" either. Will see > what could have caused this. Any tips on debugging? The only thing I can think of is to bisect the packages you have enabled/loaded.
Bug#1050685: elpa-debian-el: Error when using debian-bug on certain binary package: (wrong-type-argument processp nil)
David Bremner writes: > Control: tag -1 unreproducible > > Xiyue Deng writes: > >> Package: elpa-debian-el >> Version: 37.10 >> Severity: normal >> X-Debbugs-Cc: none, Xiyue Deng >> >> I've encountered an error when using "M-x debian-bug" on certain binary >> package, such as linux-image-6.4.0-3-amd64. The error backtrace look >> like this: >> > > I can't duplicate this in testing. Maybe try with a minimal config to > isolate some interaction with other addons? > > d Hmm, indeed I cannot reproduce this with "emacs -Q" either. Will see what could have caused this. Any tips on debugging?
Bug#1050685: elpa-debian-el: Error when using debian-bug on certain binary package: (wrong-type-argument processp nil)
Control: tag -1 unreproducible Xiyue Deng writes: > Package: elpa-debian-el > Version: 37.10 > Severity: normal > X-Debbugs-Cc: none, Xiyue Deng > > I've encountered an error when using "M-x debian-bug" on certain binary > package, such as linux-image-6.4.0-3-amd64. The error backtrace look > like this: > I can't duplicate this in testing. Maybe try with a minimal config to isolate some interaction with other addons? d
Bug#1050685: elpa-debian-el: Error when using debian-bug on certain binary package: (wrong-type-argument processp nil)
Package: elpa-debian-el Version: 37.10 Severity: normal X-Debbugs-Cc: none, Xiyue Deng I've encountered an error when using "M-x debian-bug" on certain binary package, such as linux-image-6.4.0-3-amd64. The error backtrace look like this: , | Debugger entered--Lisp error: (wrong-type-argument processp nil) | set-process-sentinel(nil (lambda (process event) (debian-bug-script-sentinel process event "linux-image-6.1.0-11-amd64" "normal" "Test" nil "/tmp/debian-bug-016wM9" #))) | debian-bug-run-bug-script("linux-image-6.1.0-11-amd64" "normal" "Test" nil) | debian-bug-package() | debian-bug() | funcall-interactively(debian-bug) | command-execute(debian-bug record) | execute-extended-command(nil "debian-bug" "debian-bug") | funcall-interactively(execute-extended-command nil "debian-bug" "debian-bug") | command-execute(execute-extended-command) ` This happens on both stable and testing, so it's not Emacs 29.1 related. Due to my lacking in elisp I haven't figured out a fix, but preliminarily I suspect that in the triggering case the error originates from [1] where "term-exec" may have failed so that the next "get-buffer-process" returns nil which in turn caused this error at [2]. [1] https://salsa.debian.org/emacsen-team/debian-el/-/blob/master/debian-bug.el#L892-895 [2] https://salsa.debian.org/emacsen-team/debian-el/-/blob/master/debian-bug.el#L906 -- System Information: Debian Release: 12.1 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 6.1.0-11-amd64 (SMP w/16 CPU threads; PREEMPT) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages elpa-debian-el depends on: ii bzip2 1.0.8-5+b1 ii dh-elpa-helper 2.0.16 ii dpkg1.21.22 ii emacsen-common 3.0.5 ii reportbug 12.0.0 ii xz-utils5.4.1-0.2 Versions of packages elpa-debian-el recommends: ii emacs 1:28.2+1-15 ii emacs-gtk [emacs] 1:28.2+1-15 ii wget 1.21.3-1+b2 elpa-debian-el suggests no packages. -- no debconf information