Bug 2155800

Summary: ghc fails epollCreate with invalid argument on i386
Product: [Fedora] Fedora Reporter: Dridi Boukelmoune <dridi.boukelmoune>
Component: ghcAssignee: Jens Petersen <petersen>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: petersen
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Unspecified   
Whiteboard:
Fixed In Version: glibc-2.36.9000-19.fc38 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-12-26 12:46:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2152821    

Description Dridi Boukelmoune 2022-12-22 12:33:01 UTC
Description of problem:

Trying to run ghc on i686 rawhide (f38) consistently fails with the following error message:

> epollCreate: invalid argument (Invalid argument)

First observed on a scratch build for ShellCheck 0.9:

https://koji.fedoraproject.org/koji/taskinfo?taskID=95610181

The same scratch build on f37 succeeds:

https://koji.fedoraproject.org/koji/taskinfo?taskID=95612202

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

ghc-compiler-8.10.7-121.fc37.i686 (this is f38/rawhide)

How reproducible:

Always, no matter the command line arguments.

Steps to Reproduce:

Just run a ghc command, with or without arguments.

Additional info:

I was able to reproduce it locally with mock. It may simply need a rebuild after a dependency changed on f38.

According to multiple strace'd executions the error is caused by a negative size passed to epoll_create():

> epoll_create(-224406580) = -1 EINVAL (Invalid argument)
> epoll_create(-224640052) = -1 EINVAL (Invalid argument)
> epoll_create(-224885812) = -1 EINVAL (Invalid argument)

The first size is the one showing up the most over multiple executions.

Comment 1 Jens Petersen 2022-12-23 08:42:42 UTC
Hmm this is a bit concerning, even though i686 is no longer a blocking arch.

Comment 2 Jens Petersen 2022-12-23 08:47:46 UTC
Rawhide error:

+ ghc --make -package Cabal -no-user-package-db -dynamic Setup
epollCreate: invalid argument (Invalid argument)
error: Bad exit status from /var/tmp/rpm-tmp.YzEthl (%build)

Comment 3 Jens Petersen 2022-12-23 09:37:21 UTC
The biggest changes in the buildroot from f37 to f38 seem to be:

glibc: 2.36-8.fc37 -> 2.36.9000-18.fc38
libffi: 3.4.2-9.fc37 -> 3.4.4-1.fc38
redhat-rpm-config: 228-1.fc37 -> 235-1.fc38

Comment 4 Jens Petersen 2022-12-26 12:46:59 UTC

*** This bug has been marked as a duplicate of bug 2155825 ***

Comment 5 Jens Petersen 2022-12-26 12:48:45 UTC
This looks fixed by glibc-2.36.9000-19.fc38.i686