* bug#38777: 26.3; tar-mode doesn't list a file / crashes on package-tar-file-info
@ 2019-12-28 18:09 Victor Collod
2019-12-28 19:54 ` Eli Zaretskii
0 siblings, 1 reply; 4+ messages in thread
From: Victor Collod @ 2019-12-28 18:09 UTC (permalink / raw)
To: 38777
Hello!
A few months ago, the nix port of irony stopped building for a very, very strange reason:
when the complete path of the package metadata file is 32 characters long (plus some other unknown conditions), it isn't shown in the tar-mode file list view, and running (package-tar-file-info) fails with the following stack trace:
> Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
> tar--describe-as-link(nil)
> tar--check-descriptor(nil)
> tar-get-file-descriptor("irony-20190703.1732/irony-pkg.el")
> package-tar-file-info()
> eval((package-tar-file-info) nil)
> eval-expression((package-tar-file-info) nil nil 127)
> funcall-interactively(eval-expression (package-tar-file-info) nil nil 127)
> call-interactively(eval-expression record nil)
> command-execute(eval-expression record)
> execute-extended-command(nil "eval-expression" nil)
> funcall-interactively(execute-extended-command nil "eval-expression" nil)
> call-interactively(execute-extended-command nil nil)
> command-execute(execute-extended-command)
Unfortunately, my yet to be found lisp programming skills are way too low to solve this issue.
I have tried and failed to understand what's going on. Perhaps this bug isn't a good introduction to lisp programming :/
Here is the related (worked around) NixOS issue:
https://github.com/NixOS/nixpkgs/issues/66556#issuecomment-522809883
And a link to a zip file containing the cursed tar file:
https://github.com/NixOS/nixpkgs/files/3522572/repro.zip
Configured using:
'configure
--prefix=/nix/store/bgv2mpq96crnldxkq79iwc31qadnq5al-emacs-26.3
--disable-build-details --with-modules --with-x-toolkit=gtk3 --with-xft
CFLAGS=-DMAC_OS_X_VERSION_MAX_ALLOWED=101200'
Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND DBUS GSETTINGS GLIB NOTIFY LIBSELINUX
GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS
GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD
Important settings:
value of $EMACSLOADPATH: /nix/store/62ynkkg5w0c1kxwlxdwzcvja47wmxycl-emacs-packages-deps/share/emacs/site-lisp:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: Debugger
Minor modes in effect:
shell-dirtrack-mode: t
global-whitespace-mode: t
which-key-mode: t
editorconfig-mode: t
diff-auto-refine-mode: t
show-paren-mode: t
tooltip-mode: t
global-eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
buffer-read-only: t
column-number-mode: t
line-number-mode: t
transient-mark-mode: t
Load-path shadows:
/home/multun/.nix-profile/share/emacs/site-lisp/git hides /run/current-system/sw/share/emacs/site-lisp/git
/home/multun/.nix-profile/share/emacs/site-lisp/git-blame hides /run/current-system/sw/share/emacs/site-lisp/git-blame
/run/current-system/sw/share/emacs/site-lisp/site-start hides /nix/store/62ynkkg5w0c1kxwlxdwzcvja47wmxycl-emacs-packages-deps/share/emacs/site-lisp/site-start
/run/current-system/sw/share/emacs/site-lisp/site-start hides /nix/store/bgv2mpq96crnldxkq79iwc31qadnq5al-emacs-26.3/share/emacs/site-lisp/site-start
/nix/store/62ynkkg5w0c1kxwlxdwzcvja47wmxycl-emacs-packages-deps/share/emacs/site-lisp/elpa/seq-2.20/seq hides /nix/store/bgv2mpq96crnldxkq79iwc31qadnq5al-emacs-26.3/share/emacs/26.3/lisp/emacs-lisp/seq
/nix/store/62ynkkg5w0c1kxwlxdwzcvja47wmxycl-emacs-packages-deps/share/emacs/site-lisp/elpa/let-alist-1.0.6/let-alist hides /nix/store/bgv2mpq96crnldxkq79iwc31qadnq5al-emacs-26.3/share/emacs/26.3/lisp/emacs-lisp/let-alist
Features:
(cl-print debug shadow sort company-oddmuse company-keywords
company-etags etags company-gtags company-dabbrev-code company-dabbrev
company-files company-capf company-cmake company-xcode company-clang
company-semantic company-eclim company-bbdb company-irony
company-template company pcase mail-extr tar-mode arc-mode archive-mode
emacsbug yaml-mode diff novice xref project vc vc-dispatcher smerge-mode
js sgml-mode dom imenu rst compile writeroom-mode visual-fill-column
dired-aux face-remap nix-mode ffap nix-repl nix-shell nix-store
nix-instantiate nix-shebang nix-format nix markdown-mode color noutline
outline python tramp-sh tramp tramp-compat tramp-loaddefs trampver
ucs-normalize shell pcomplete parse-time comint ring ansi-color
make-mode two-column iso-transl sendmail misearch multi-isearch lisp-mnt
irony-cdb-libclang irony-cdb-json pp irony-cdb-clang-complete irony-cdb
irony-completion irony-snippet flycheck-irony irony-diagnostics irony
irony-iotask flycheck cl-extra json map find-func help-mode rx subr-x
dash cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align
cc-engine cc-vars cc-defs vc-git sh-script smie executable server
elec-pair multiple-cursors mc-hide-unmatched-lines-mode
mc-separate-operations rectangular-region-mode mc-mark-pop mc-mark-more
mc-cycle-cursors mc-edit-lines multiple-cursors-core rect clang-format
xml whitespace rainbow-delimiters which-key editorconfig notmuch hl-line
notmuch-hello wid-edit notmuch-tree notmuch-show notmuch-print
notmuch-crypto notmuch-mua notmuch-message notmuch-draft
notmuch-maildir-fcc notmuch-address notmuch-company notmuch-parser
notmuch-wash diff-mode easy-mmode coolj notmuch-query goto-addr
thingatpt icalendar diary-lib diary-loaddefs cal-menu calendar
cal-loaddefs notmuch-tag edmacro kmacro crm notmuch-lib advice
notmuch-version notmuch-compat cl message rmc puny dired dired-loaddefs
format-spec rfc822 mml mailabbrev gmm-utils mailheader mm-view mml-smime
mml-sec epa derived epg gnus-util rmail rmail-loaddefs mail-utils smime
dig mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047
rfc2045 mm-util ietf-drums mail-prsvr time-date tsdh-dark-theme paren
cus-start cus-load finder-inf info package easymenu epg-config
url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache url-vars seq seq-25 byte-opt gv bytecomp
byte-compile cconv cl-loaddefs cl-lib mule-util tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads dbusbind inotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)
Memory information:
((conses 16 813410 99456)
(symbols 48 53733 20)
(miscs 40 4416 6082)
(strings 32 159751 8703)
(string-bytes 1 4644355)
(vectors 16 74595)
(vector-slots 8 2364846 103216)
(floats 8 328 893)
(intervals 56 71244 222)
(buffers 992 99))
--
Victor Collod
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#38777: 26.3; tar-mode doesn't list a file / crashes on package-tar-file-info
2019-12-28 18:09 bug#38777: 26.3; tar-mode doesn't list a file / crashes on package-tar-file-info Victor Collod
@ 2019-12-28 19:54 ` Eli Zaretskii
2019-12-28 20:52 ` Andreas Schwab
0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2019-12-28 19:54 UTC (permalink / raw)
To: Victor Collod; +Cc: 38777
> Date: Sat, 28 Dec 2019 19:09:40 +0100
> From: Victor Collod <victor.collod@epita.fr>
>
> A few months ago, the nix port of irony stopped building for a very, very strange reason:
> when the complete path of the package metadata file is 32 characters long (plus some other unknown conditions), it isn't shown in the tar-mode file list view, and running (package-tar-file-info) fails with the following stack trace:
>
> > Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
> > tar--describe-as-link(nil)
> > tar--check-descriptor(nil)
> > tar-get-file-descriptor("irony-20190703.1732/irony-pkg.el")
> > package-tar-file-info()
> > eval((package-tar-file-info) nil)
> > eval-expression((package-tar-file-info) nil nil 127)
> > funcall-interactively(eval-expression (package-tar-file-info) nil nil 127)
> > call-interactively(eval-expression record nil)
> > command-execute(eval-expression record)
> > execute-extended-command(nil "eval-expression" nil)
> > funcall-interactively(execute-extended-command nil "eval-expression" nil)
> > call-interactively(execute-extended-command nil nil)
> > command-execute(execute-extended-command)
>
> Unfortunately, my yet to be found lisp programming skills are way too low to solve this issue.
> I have tried and failed to understand what's going on. Perhaps this bug isn't a good introduction to lisp programming :/
>
> Here is the related (worked around) NixOS issue:
> https://github.com/NixOS/nixpkgs/issues/66556#issuecomment-522809883
>
> And a link to a zip file containing the cursed tar file:
> https://github.com/NixOS/nixpkgs/files/3522572/repro.zip
Looks like invalid tar file? It uses the magic string of "ustar "
(two trailing blanks), whereas we only recognize at most one. So the
first entry with a file name longer than 100 bytes confuses
tar-mode.el.
Does anyone know if this is valid in tar files? If so,
tar-header-block-tokenize will have to be updated.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#38777: 26.3; tar-mode doesn't list a file / crashes on package-tar-file-info
2019-12-28 19:54 ` Eli Zaretskii
@ 2019-12-28 20:52 ` Andreas Schwab
2019-12-30 16:20 ` Eli Zaretskii
0 siblings, 1 reply; 4+ messages in thread
From: Andreas Schwab @ 2019-12-28 20:52 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Victor Collod, 38777
On Dez 28 2019, Eli Zaretskii wrote:
> Looks like invalid tar file? It uses the magic string of "ustar "
> (two trailing blanks), whereas we only recognize at most one.
That's the oldgnu format.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#38777: 26.3; tar-mode doesn't list a file / crashes on package-tar-file-info
2019-12-28 20:52 ` Andreas Schwab
@ 2019-12-30 16:20 ` Eli Zaretskii
0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2019-12-30 16:20 UTC (permalink / raw)
To: Andreas Schwab; +Cc: victor.collod, 38777-done
> From: Andreas Schwab <schwab@linux-m68k.org>
> Cc: Victor Collod <victor.collod@epita.fr>, 38777@debbugs.gnu.org
> Date: Sat, 28 Dec 2019 21:52:35 +0100
>
> On Dez 28 2019, Eli Zaretskii wrote:
>
> > Looks like invalid tar file? It uses the magic string of "ustar "
> > (two trailing blanks), whereas we only recognize at most one.
>
> That's the oldgnu format.
Thanks.
I found the problem in tar-mode.el when reading oldgnu format, and
fixed it on the emacs-27 branch. I'm therefore closing the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-12-30 16:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-28 18:09 bug#38777: 26.3; tar-mode doesn't list a file / crashes on package-tar-file-info Victor Collod
2019-12-28 19:54 ` Eli Zaretskii
2019-12-28 20:52 ` Andreas Schwab
2019-12-30 16:20 ` Eli Zaretskii
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.