Bug 1651725 - problems with regex.h
Summary: problems with regex.h
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: 29
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Carlos O'Donell
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-20 16:20 UTC by owen94012
Modified: 2019-10-08 13:37 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-10-08 13:36:48 UTC


Attachments (Terms of Use)
rpm -Va log (2.78 MB, text/plain)
2018-11-21 10:04 UTC, owen94012
no flags Details

Description owen94012 2018-11-20 16:20:09 UTC
Description of problem:

PLEASE NOTE, not REGEXP but REGEX.H

Trying to build universal-ctags from source I get this error

checking if regcomp works... no
configure: error: regcomp() on this system is broken.

I look at the configure file and see this code:
#include <sys/types.h>
#include <regex.h>
int main(void) {
	regex_t patbuf;
	return (regcomp (&patbuf, "/hello/", 0) != 0);
}


I created a simple regcomp.c file, compile it with gcc -g -Wall -o zzz regcomp.c

I get coredumps


Version-Release number of selected component (if applicable):

Linux localhost.localdomain 4.18.17-300.fc29.x86_64 #1 SMP Mon Nov 5 17:56:16 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux


How reproducible:


Steps to Reproduce:
1. compile the sample program above
2. run it, it core dumps

Actual results:

/fdev/universal-ctags/zzz 
Missing separate debuginfos, use: dnf debuginfo-install glibc-2.28-17.fc29.x86_64

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7dff40a in __libc_start_main () from /lib64/libc.so.6
(gdb) bt
#0  0x00007ffff7dff40a in __libc_start_main () from /lib64/libc.so.6
#1  0x000000000040107e in _start ()


Expected results:

compile and pass regex tst

Additional info:

environment
_=*20379*/usr/bin/env
BASH_ENV=/usr/share/Modules/init/ksh
CC=/usr/bin/gcc
COLORFGBG=default;default
COLORTERM=rxvt-xpm
COMP_KEY=0
COMP_POINT=0
COMP_TYPE=0
CXX=/usr/bin/g++
DESKTOP_STARTUP_ID=i3/i3-sensible-terminal/566-126-localhost.localdomain_TIME530937447
DISPLAY=:0
EDITOR=nvim
ENV=/usr/share/Modules/init/profile.sh
F77=/usr/bin/gfortran
F90=/usr/bin/gfortran
FC=/usr/bin/gfortran
FPATH=/usr/share/Modules/init/ksh-functions
HISTCONTROL=ignoredups
HISTSIZE=1000
HOME=/home/user
HOSTNAME=me
INVOCATION_ID=20e51c0c8a3b43e5a81235ce7f17e9e8
JOURNAL_STREAM=9:979914
KDEDIRS=/usr
LANG=en_US.UTF-8
LESSOPEN=||/usr/bin/lesspipe.sh %s
LOADEDMODULES=
LOGNAME=user
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=01;36:*.au=01;36:*.flac=01;36:*.m4a=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:*.ogg=01;36:*.ra=01;36:*.wav=01;36:*.oga=01;36:*.opus=01;36:*.spx=01;36:*.xspf=01;36:
MAIL=/var/spool/mail/user
MODULEPATH=/etc/scl/modulefiles:/etc/scl/modulefiles:/usr/share/Modules/modulefiles:/etc/modulefiles:/usr/share/modulefiles
MODULEPATH_modshare=/usr/share/modulefiles:1:/etc/modulefiles:1:/usr/share/Modules/modulefiles:1
MODULESHOME=/usr/share/Modules
MODULES_CMD=/usr/share/Modules/libexec/modulecmd.tcl
MODULES_RUN_QUARANTINE=LD_LIBRARY_PATH
PATH=/usr/share/Modules/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/user/dev/spack/bin:/home/user/dev/tlaplus/org.lamport.tla.toolbox.product.product/target/products/org.lamport.tla.toolbox.product.product/linux/gtk/x86_64/toolbox:/home/user/dev/spack/opt/spack/linux-fedora29-x86_64/gcc-8.2.1/gmsh-4.0.0-nlwykecq46dn3nnnexzxuvlny3zp2o6q/bin
PS1=$HOSTNAME@$USER [$PWD]ยป 
PWD=/home/user/dev/universal-ctags
SHELL=/usr/local/bin/ksh
SHLVL=4
TERM=xterm-256color
TERMINFO=/usr/share/terminfo
USER=user
VISUAL=nvim
WINDOWID=67108874
WINDOWPATH=1
XAUTHORITY=/home/user/.Xauthority
XDG_DATA_DIRS=/home/user/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share
XDG_RUNTIME_DIR=/run/user/1000
XDG_SEAT=seat0
XDG_SESSION_ID=5
XDG_VTNR=1
XORG_RUN_AS_USER_OK=1
A__z=F*COMP_KEY=F*COMP_POINT=F*COMP_TYPE="*SHLVL

Comment 1 Florian Weimer 2018-11-20 18:33:02 UTC
Please install debugging information using:

sudo dnf debuginfo-install glibc-2.28-17.fc29.x86_64

and print the backtrace again.  Thanks.

Comment 2 owen94012 2018-11-20 19:05:09 UTC
Here's the new backtrace

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7e2940a in __libc_start_main (main=0x401136 <main>, argc=1, argv=0x7fffffffdfb8, 
    init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdfa8)
    at ../csu/libc-start.c:308
308	      result = main (argc, argv, __environ MAIN_AUXVEC_PARAM);
(gdb) bt
#0  0x00007ffff7e2940a in __libc_start_main (main=0x401136 <main>, argc=1, argv=0x7fffffffdfb8, 
    init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdfa8)
    at ../csu/libc-start.c:308
#1  0x000000000040107e in _start ()

Comment 3 Florian Weimer 2018-11-20 19:39:21 UTC
Something is really broken with your toolchain.

Please attach the output of this command:

$ gcc -v -g -Wall -o zzz regcomp.c

It should log the GCC and link editor invocations.

Please also check that

# rpm -Va

does not report any corrupt files.

Comment 4 owen94012 2018-11-21 05:50:04 UTC
gcc -v -g -Wall -ozzz regcomp.c | xclip -selection clipboard
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --enable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 8.2.1 20181105 (Red Hat 8.2.1-5) (GCC) 
COLLECT_GCC_OPTIONS='-v' '-g' '-Wall' '-o' 'zzz' '-mtune=generic' '-march=x86-64'
 /usr/libexec/gcc/x86_64-redhat-linux/8/cc1 -quiet -v regcomp.c -quiet -dumpbase regcomp.c -mtune=generic -march=x86-64 -auxbase regcomp -g -Wall -version -o /tmp/ccVY60sU.s
GNU C17 (GCC) version 8.2.1 20181105 (Red Hat 8.2.1-5) (x86_64-redhat-linux)
	compiled by GNU C version 8.2.1 20181105 (Red Hat 8.2.1-5), GMP version 6.1.2, MPFR version 3.1.6-p2, MPC version 1.1.0, isl version isl-0.16.1-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/8/include-fixed"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/8/../../../../x86_64-redhat-linux/include"
ignoring duplicate directory "/usr/include"
  as it is a non-system directory that duplicates a system directory
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/x86_64-redhat-linux/8/include
 /usr/local/include
 /usr/include
End of search list.
GNU C17 (GCC) version 8.2.1 20181105 (Red Hat 8.2.1-5) (x86_64-redhat-linux)
	compiled by GNU C version 8.2.1 20181105 (Red Hat 8.2.1-5), GMP version 6.1.2, MPFR version 3.1.6-p2, MPC version 1.1.0, isl version isl-0.16.1-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 5eb30b93b435e5edc29264647b3608a3
COLLECT_GCC_OPTIONS='-v' '-g' '-Wall' '-o' 'zzz' '-mtune=generic' '-march=x86-64'
 as -v --64 -o /tmp/cc9fPn2l.o /tmp/ccVY60sU.s
GNU assembler version 2.31.1 (x86_64-redhat-linux) using BFD version version 2.31.1-13.fc29
COMPILER_PATH=/usr/libexec/gcc/x86_64-redhat-linux/8/:/usr/libexec/gcc/x86_64-redhat-linux/8/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/8/:/usr/lib/gcc/x86_64-redhat-linux/
LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/8/:/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/8/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-g' '-Wall' '-o' 'zzz' '-mtune=generic' '-march=x86-64'
 /usr/libexec/gcc/x86_64-redhat-linux/8/collect2 -plugin /usr/libexec/gcc/x86_64-redhat-linux/8/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper -plugin-opt=-fresolution=/tmp/ccpj2QDN.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o zzz /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/8/crtbegin.o -L/usr/lib/gcc/x86_64-redhat-linux/8 -L/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/8/../../.. /tmp/cc9fPn2l.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-redhat-linux/8/crtend.o /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/crtn.o
COLLECT_GCC_OPTIONS='-v' '-g' '-Wall' '-o' 'zzz' '-mtune=generic' '-march=x86-64'

Comment 5 owen94012 2018-11-21 10:04:04 UTC
Created attachment 1507582 [details]
rpm -Va log

Comment 6 owen94012 2018-11-22 11:28:08 UTC
is there any progress on this issue?

Comment 7 Florian Weimer 2018-11-22 11:33:31 UTC
(In reply to owen94012 from comment #6)
> is there any progress on this issue?

No, we do not have enough information to reproduce this issue, and the cause is not clear.

Comment 8 owen94012 2018-11-22 12:44:22 UTC
(In reply to Florian Weimer from comment #7)
> (In reply to owen94012 from comment #6)
> > is there any progress on this issue?
> 
> No, we do not have enough information to reproduce this issue, and the cause
> is not clear.

what other information could I provide?

Comment 9 Carlos O'Donell 2019-10-08 13:36:48 UTC
(In reply to owen94012 from comment #8)
> (In reply to Florian Weimer from comment #7)
> > (In reply to owen94012 from comment #6)
> > > is there any progress on this issue?
> > 
> > No, we do not have enough information to reproduce this issue, and the cause
> > is not clear.
> 
> what other information could I provide?

This bug is really just weird. The behaviour your are seeing we would not expect, nor can we reproduce it.

I would like you to note that the digest for:

* /bin/bash, 
* /usr/bin/which,

indicate alterations, which could mean your system is corrupted in some way. This is very suspicious e.g. rootkit level suspicious.

I would suggest that you need to fix this system, test on another system, or reach out to the Fedora user help community.

I'm closing this as CLOSED/NOTABUG for now.


Note You need to log in before you can comment on or make changes to this bug.