jq bug report: jq errors trigger assertion errors rather than being handled

Adam Dinwoodie adam@dinwoodie.org
Tue Mar 26 16:25:59 GMT 2024


Hi,

I'm seeing consistent behaviour when running `jq` on Cygwin, where
commands that should trigger jq to produce an error message instead
cause it to assert and die.

Simple test case: run `jq -n 'error("oh no!")'`, which should raise a jq
error with the text "oh no!".

Output on Cygwin:

    $ jq -n 'error("oh no!")'
    assertion "cb == jq_util_input_next_input_cb" failed: file "/cygdrive/d/a/scallywag/jq/jq-1.7.1-1.x86_64/src/jq-1.7.1/src/util.c", line 360, function: jq_util_input_get_position
                     Aborted

Expected output, as seen on my handy Debian box:

    $ jq -n 'error("oh no!")'
    jq: error (at <unknown>): oh no!

I've attached the cygcheck.out file from the system where I ran the
above.

Cheers,

Adam
-------------- next part --------------

Cygwin Configuration Diagnostics
Current System Time: Tue Mar 26 17:16:49 2024

Windows 11 Enterprise Ver 10.0 Build 22621 

Running in Terminal Service session

Path:	C:\cygwin64\usr\local\bin
	C:\cygwin64\bin
	C:\Windows\system32
	C:\Windows
	C:\Windows\System32\Wbem
	C:\Windows\System32\WindowsPowerShell\v1.0
	C:\Users\WDAGUtilityAccount\AppData\Local\Microsoft\WindowsApps

Output from C:\cygwin64\bin\id.exe
UID: 197112(WDAGUtilityAccount)
GID: 197121(None)
197121(None)
114(Local account and member of Administrators group)
555(Remote Desktop Users)
545(Users)
544(Administrators)
14(REMOTE INTERACTIVE LOGON)
4(INTERACTIVE)
11(Authenticated Users)
15(This Organization)
113(Local account)
4095(CurrentSession)
66048(LOCAL)
262154(NTLM Authentication)
405504(High Mandatory Level)

SysDir: C:\Windows\system32
WinDir: C:\Windows

PWD = '/home/WDAGUtilityAccount'
HOME = '/home/WDAGUtilityAccount'
USER = 'WDAGUtilityAccount'

ProgramFiles(x86) = 'C:\Program Files (x86)'
!:: = '::\'
CommonProgramFiles(x86) = 'C:\Program Files (x86)\Common Files'
SHELL = '/bin/bash'
NUMBER_OF_PROCESSORS = '20'
PROCESSOR_LEVEL = '6'
TERM_PROGRAM_VERSION = '3.7.1'
USERDOMAIN_ROAMINGPROFILE = '53A298FF-19DC-4'
HOSTNAME = '53a298ff-19dc-4841-bc68-9223d670a672'
PROGRAMFILES = 'C:\Program Files'
EFC_4284 = '0'
PATHEXT = '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC'
OS = 'Windows_NT'
HOMEDRIVE = 'C:'
USERDOMAIN = '53A298FF-19DC-4'
USERPROFILE = 'C:\Users\WDAGUtilityAccount'
TZ = 'Europe/London'
ALLUSERSPROFILE = 'C:\ProgramData'
ORIGINAL_PATH = '/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Users/WDAGUtilityAccount/AppData/Local/Microsoft/WindowsApps'
CommonProgramW6432 = 'C:\Program Files\Common Files'
USERNAME = 'WDAGUtilityAccount'
COMSPEC = 'C:\Windows\system32\cmd.exe'
APPDATA = 'C:\Users\WDAGUtilityAccount\AppData\Roaming'
SYSTEMROOT = 'C:\Windows'
LOCALAPPDATA = 'C:\Users\WDAGUtilityAccount\AppData\Local'
COMPUTERNAME = '53A298FF-19DC-4'
INFOPATH = '/usr/local/info:/usr/share/info:/usr/info'
TERM = 'xterm'
LOGONSERVER = '\\53A298FF-19DC-4'
PSModulePath = 'C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules'
TEMP = '/tmp'
SHLVL = '1'
PROCESSOR_REVISION = '9a03'
DriverData = 'C:\Windows\System32\Drivers\DriverData'
COMMONPROGRAMFILES = 'C:\Program Files\Common Files'
LC_CTYPE = 'en_US.UTF-8'
PROCESSOR_IDENTIFIER = 'Intel64 Family 6 Model 154 Stepping 3, GenuineIntel'
SESSIONNAME = '31C5CE94259D4006A9E4#0'
PS1 = '\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n\$ '
HOMEPATH = '\Users\WDAGUtilityAccount'
TMP = '/tmp'
ProgramW6432 = 'C:\Program Files'
PROFILEREAD = 'true'
MINTTY_SHORTCUT = '/cygdrive/c/Users/Public/Desktop/Cygwin64 Terminal.lnk'
WINDIR = 'C:\Windows'
PROCESSOR_ARCHITECTURE = 'AMD64'
PUBLIC = 'C:\Users\Public'
CLIENTNAME = 'f33ef77f-51f2-4'
SYSTEMDRIVE = 'C:'
EXECIGNORE = '*.dll'
OLDPWD = '/etc/skel'
TERM_PROGRAM = 'mintty'
ProgramData = 'C:\ProgramData'
_ = '/usr/bin/cygcheck'

HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\Installations
  (default) = '\??\C:\cygwin64'
HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\setup
  (default) = 'C:\cygwin64'

obcaseinsensitive set to 1

Cygwin installations found in the registry:
  System: Key: e022582115c10879 Path: C:\cygwin64

c:  hd  NTFS     40830Mb   7% CP CS UN PA FC        

C:\cygwin64      /          system  binary,auto
C:\cygwin64\bin  /usr/bin   system  binary,auto
C:\cygwin64\lib  /usr/lib   system  binary,auto
cygdrive prefix  /cygdrive  user    binary,posix=0,auto

Found: C:\cygwin64\bin\awk
 -> C:\cygwin64\bin\gawk.exe
Found: C:\cygwin64\bin\bash.exe
Found: C:\cygwin64\bin\cat.exe
Found: C:\Windows\system32\certutil.exe
Not Found: clinfo
Found: C:\Windows\system32\comp.exe
Found: C:\Windows\system32\convert.exe
Found: C:\cygwin64\bin\cp.exe
Not Found: cpp (good!)
Not Found: crontab
Found: C:\Windows\system32\curl.exe
Found: C:\cygwin64\bin\expand.exe
Found: C:\Windows\system32\expand.exe
Warning: C:\cygwin64\bin\expand.exe hides C:\Windows\system32\expand.exe
Found: C:\cygwin64\bin\find.exe
Found: C:\Windows\system32\find.exe
Warning: C:\cygwin64\bin\find.exe hides C:\Windows\system32\find.exe
Found: C:\Windows\system32\ftp.exe
Not Found: gcc
Not Found: gdb
Found: C:\cygwin64\bin\grep.exe
Found: C:\cygwin64\bin\hostname.exe
Found: C:\Windows\system32\hostname.exe
Warning: C:\cygwin64\bin\hostname.exe hides C:\Windows\system32\hostname.exe
Found: C:\cygwin64\bin\kill.exe
Not Found: klist
Not Found: ld
Found: C:\cygwin64\bin\ls.exe
Not Found: make
Found: C:\cygwin64\bin\mv.exe
Found: C:\Windows\system32\nslookup.exe
Not Found: patch
Not Found: perl
Found: C:\Windows\system32\replace.exe
Found: C:\cygwin64\bin\rm.exe
Found: C:\cygwin64\bin\sed.exe
Found: C:\cygwin64\bin\sh.exe
Found: C:\Windows\system32\shutdown.exe
Found: C:\cygwin64\bin\sort.exe
Found: C:\Windows\system32\sort.exe
Warning: C:\cygwin64\bin\sort.exe hides C:\Windows\system32\sort.exe
Not Found: ssh
Found: C:\cygwin64\bin\tar.exe
Found: C:\Windows\system32\tar.exe
Warning: C:\cygwin64\bin\tar.exe hides C:\Windows\system32\tar.exe
Found: C:\cygwin64\bin\test.exe
Found: C:\cygwin64\bin\timeout.exe
Found: C:\Windows\system32\timeout.exe
Warning: C:\cygwin64\bin\timeout.exe hides C:\Windows\system32\timeout.exe
Found: C:\cygwin64\bin\vi.exe
Not Found: vim
Found: C:\cygwin64\bin\whoami.exe
Found: C:\Windows\system32\whoami.exe
Warning: C:\cygwin64\bin\whoami.exe hides C:\Windows\system32\whoami.exe

   45k 2023/07/11 C:\cygwin64\bin\cygargp-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygargp-0.dll" v0.0 ts=2023-07-11 20:11
   17k 2023/01/15 C:\cygwin64\bin\cygattr-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygattr-1.dll" v0.0 ts=2023-01-15 15:39
  281k 2024/03/08 C:\cygwin64\bin\cygblkid-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygblkid-1.dll" v0.0 ts=2024-03-08 06:27
   66k 2019/07/21 C:\cygwin64\bin\cygbz2-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygbz2-1.dll" v0.0 ts=2019-07-22 00:05
 2487k 2023/09/12 C:\cygwin64\bin\cygcrypto-1.1.dll - os=4.0 img=0.0 sys=5.2
                  "cygcrypto-1.1.dll" v0.0 ts=2023-09-12 18:36
 3760k 2024/02/03 C:\cygwin64\bin\cygcrypto-3.dll - os=4.0 img=0.0 sys=5.2
                  "cygcrypto-3.dll" v0.0 ts=2024-02-03 15:51
  389k 2024/03/08 C:\cygwin64\bin\cygfdisk-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygfdisk-1.dll" v0.0 ts=2024-03-08 06:27
   27k 2015/11/17 C:\cygwin64\bin\cygffi-6.dll - os=4.0 img=0.0 sys=5.2
                  "cygffi-6.dll" v0.0 ts=2015-11-17 22:14
   60k 2024/01/21 C:\cygwin64\bin\cygformw-10.dll - os=4.0 img=0.0 sys=5.2
                  "cygformw-10.dll" v0.0 ts=2024-01-21 04:35
   74k 2023/06/05 C:\cygwin64\bin\cyggcc_s-seh-1.dll - os=4.0 img=0.0 sys=5.2
                  "cyggcc_s-seh-1.dll" v0.0 ts=2023-06-05 16:00
   49k 2019/07/10 C:\cygwin64\bin\cyggdbm-6.dll - os=4.0 img=0.0 sys=5.2
                  "cyggdbm-6.dll" v0.0 ts=2019-07-10 14:53
  591k 2023/07/31 C:\cygwin64\bin\cyggmp-10.dll - os=4.0 img=0.0 sys=5.2
                  "cyggmp-10.dll" v0.0 ts=2023-07-31 20:20
   36k 2022/10/08 C:\cygwin64\bin\cyghistory7.dll - os=4.0 img=0.0 sys=5.2
                  "cyghistory7.dll" v0.0 ts=2022-10-08 05:37
 1063k 2022/05/23 C:\cygwin64\bin\cygiconv-2.dll - os=4.0 img=0.0 sys=5.2
                  "cygiconv-2.dll" v0.0 ts=2022-05-23 12:22
  105k 2023/11/25 C:\cygwin64\bin\cygintl-8.dll - os=4.0 img=0.0 sys=5.2
                  "cygintl-8.dll" v0.0 ts=2023-11-25 22:21
  384k 2024/01/02 C:\cygwin64\bin\cygjq-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygjq-1.dll" v0.0 ts=2024-01-02 16:26
  136k 2022/10/30 C:\cygwin64\bin\cyglz4-1.dll - os=4.0 img=0.0 sys=5.2
                  "cyglz4-1.dll" v0.0 ts=2022-10-30 17:59
  175k 2024/03/10 C:\cygwin64\bin\cyglzma-5.dll - os=4.0 img=0.0 sys=5.2
                  "cyglzma-5.dll" v0.0 ts=2024-03-10 21:17
  160k 2023/01/14 C:\cygwin64\bin\cygmagic-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygmagic-1.dll" v0.0 ts=2023-01-14 21:35
  214k 2023/09/24 C:\cygwin64\bin\cygman-2-12-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygman-2-12-0.dll" v0.0 ts=2023-09-24 19:20
   25k 2023/09/24 C:\cygwin64\bin\cygmandb-2-12-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygmandb-2-12-0.dll" v0.0 ts=2023-09-24 19:20
   29k 2024/01/21 C:\cygwin64\bin\cygmenuw-10.dll - os=4.0 img=0.0 sys=5.2
                  "cygmenuw-10.dll" v0.0 ts=2024-01-21 04:34
  650k 2023/08/22 C:\cygwin64\bin\cygmpfr-6.dll - os=4.0 img=0.0 sys=5.2
                  "cygmpfr-6.dll" v0.0 ts=2023-08-22 18:46
  337k 2024/01/21 C:\cygwin64\bin\cygncursesw-10.dll - os=4.0 img=0.0 sys=5.2
                  "cygncursesw-10.dll" v0.0 ts=2024-01-21 04:32
  545k 2024/03/06 C:\cygwin64\bin\cygonig-5.dll - os=4.0 img=0.0 sys=5.2
                  "cygonig-5.dll" v0.0 ts=2024-03-06 13:07
 1020k 2020/03/27 C:\cygwin64\bin\cygp11-kit-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygp11-kit-0.dll" v0.0 ts=2020-03-27 22:30
   13k 2024/01/21 C:\cygwin64\bin\cygpanelw-10.dll - os=4.0 img=0.0 sys=5.2
                  "cygpanelw-10.dll" v0.0 ts=2024-01-21 04:34
  497k 2021/06/20 C:\cygwin64\bin\cygpcre-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygpcre-1.dll" v0.0 ts=2021-06-20 12:53
  637k 2024/02/18 C:\cygwin64\bin\cygpcre2-8-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygpcre2-8-0.dll" v0.0 ts=2024-02-18 09:01
   44k 2022/10/06 C:\cygwin64\bin\cygpipeline-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygpipeline-1.dll" v0.0 ts=2022-10-06 19:49
   42k 2023/02/19 C:\cygwin64\bin\cygpopt-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygpopt-0.dll" v0.0 ts=2023-02-19 19:45
  257k 2022/10/08 C:\cygwin64\bin\cygreadline7.dll - os=4.0 img=0.0 sys=5.2
                  "cygreadline7.dll" v0.0 ts=2022-10-08 05:37
  188k 2024/03/08 C:\cygwin64\bin\cygsmartcols-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygsmartcols-1.dll" v0.0 ts=2024-03-08 06:27
  512k 2023/09/12 C:\cygwin64\bin\cygssl-1.1.dll - os=4.0 img=0.0 sys=5.2
                  "cygssl-1.1.dll" v0.0 ts=2023-09-12 18:36
  591k 2024/02/03 C:\cygwin64\bin\cygssl-3.dll - os=4.0 img=0.0 sys=5.2
                  "cygssl-3.dll" v0.0 ts=2024-02-03 15:51
 1904k 2023/06/05 C:\cygwin64\bin\cygstdc++-6.dll - os=4.0 img=0.0 sys=5.2
                  "cygstdc++-6.dll" v0.0 ts=2023-06-05 16:06
   68k 2019/07/29 C:\cygwin64\bin\cygtasn1-6.dll - os=4.0 img=0.0 sys=5.2
                  "cygtasn1-6.dll" v0.0 ts=2019-07-29 03:12
   59k 2024/01/21 C:\cygwin64\bin\cygticw-10.dll - os=4.0 img=0.0 sys=5.2
                  "cygticw-10.dll" v0.0 ts=2024-01-21 04:33
  185k 2023/07/16 C:\cygwin64\bin\cyguchardet-0.dll - os=4.0 img=0.0 sys=5.2
                  "cyguchardet-0.dll" v0.0 ts=2023-07-16 08:19
   27k 2024/03/08 C:\cygwin64\bin\cyguuid-1.dll - os=4.0 img=0.0 sys=5.2
                  "cyguuid-1.dll" v0.0 ts=2024-03-08 06:26
   88k 2024/01/27 C:\cygwin64\bin\cygz.dll - os=4.0 img=0.0 sys=5.2
                  "cygz.dll" v0.0 ts=2024-01-27 09:12
  650k 2023/04/12 C:\cygwin64\bin\cygzstd-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygzstd-1.dll" v0.0 ts=2023-04-12 16:04
 2941k 2024/02/27 C:\cygwin64\bin\cygwin1.dll - os=4.0 img=0.0 sys=5.2
                  "cygwin1.dll" v0.0 ts=2024-02-27 11:56
    Cygwin DLL version info:
        DLL version: 3.5.1
        API major: 0
        API minor: 350
        Shared data: 5
        DLL identifier: cygwin1
        Mount registry: 3
        Cygwin registry name: Cygwin
        Installations name: Installations
        Cygdrive default prefix: 
        Build date: 
        Shared id: cygwin1S5


Can't find the cygrunsrv utility, skipping services check.


Cygwin Package Information
Last downloaded files to: C:\Users\WDAGUtilityAccount\Downloads
Last downloaded files from: https://www.mirrorservice.org/sites/sourceware.org/pub/cygwin/

Package              Version                 	Status
_autorebase          001091-1                     OK
alternatives         1.26-1                       OK
base-cygwin          3.8-2                        OK
base-files           4.3-3                        OK
bash                 5.2.21-1                     OK
bzip2                1.0.8-1                      OK
ca-certificates      2023.2.62_v7.0.401-2         OK
coreutils            9.0-1                        OK
crypto-policies      20190218-1                   OK
cygutils             1.4.17-1                     OK
cygwin               3.5.1-1                      OK
dash                 0.5.12-5                     OK
diffutils            3.10-1                       OK
editrights           1.04-1                       OK
file                 5.44-1                       OK
findutils            4.9.0-1                      OK
gawk                 5.3.0-1                      OK
getent               2.18.90-5                    OK
grep                 3.11-1                       OK
groff                1.23.0-1                     OK
gzip                 1.13-1                       OK
hostname             3.13-1                       OK
info                 7.1-1                        OK
ipc-utils            1.1-1                        OK
jq                   1.7.1-1                      OK
less                 643-1                        OK
libargp              20230708-2                   OK
libattr1             2.5.1-1.20.g0981a7bfe487     OK
libblkid1            2.39.3-1                     OK
libbz2_1             1.0.8-1                      OK
libfdisk1            2.39.3-1                     OK
libffi6              3.2.1-2                      OK
libgcc1              11.4.0-1                     OK
libgdbm6             1.18.1-1                     OK
libgmp10             6.3.0-1                      OK
libiconv2            1.17-1                       OK
libintl8             0.22.4-1                     OK
libjq1               1.7.1-1                      OK
liblz4_1             1.9.4-1                      OK
liblzma5             5.6.1-1                      OK
libmpfr6             4.2.1-1                      OK
libncursesw10        6.4-20240120                 OK
libonig5             6.9.9-1                      OK
libp11-kit0          0.23.20-1                    OK
libpcre1             8.45-1                       OK
libpcre2_8_0         10.43-1                      OK
libpipeline1         1.5.6-1                      OK
libpopt-common       1.19-1                       OK
libpopt0             1.19-1                       OK
libreadline7         8.2-2                        OK
libsmartcols1        2.39.3-1                     OK
libssl1.1            1.1.1w-1                     OK
libssl3              3.0.13-1                     OK
libstdc++6           11.4.0-1                     OK
libtasn1_6           4.14-1                       OK
libuchardet0         0.0.8-1                      OK
libuuid1             2.39.3-1                     OK
libzstd1             1.5.5-1                      OK
login                1.13-1                       OK
man-db               2.12.0-1                     OK
mintty               3.7.1-1                      OK
ncurses              6.4-20240120                 OK
openssl              3.0.13-1                     OK
p11-kit              0.23.20-1                    OK
p11-kit-trust        0.23.20-1                    OK
rebase               4.6.6-1                      OK
run                  1.3.4-2                      OK
sed                  4.9-1                        OK
tar                  1.35-2                       OK
terminfo             6.4-20240120                 OK
tzcode               2024a-1                      OK
tzdata               2024a-1                      OK
util-linux           2.39.3-1                     OK
vim-minimal          9.0.2155-2                   OK
which                2.20-2                       OK
xz                   5.6.1-1                      OK
zlib0                1.3.1-1                      OK
zstd                 1.5.5-1                      OK
Use -h to see help about each section


More information about the Cygwin mailing list