bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #60774] make hangs on fcntl lock when using -O and stdout is /dev/n


From: Mike Frysinger
Subject: [bug #60774] make hangs on fcntl lock when using -O and stdout is /dev/null
Date: Fri, 11 Jun 2021 18:24:04 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; CrOS x86_64 13904.41.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.81 Safari/537.36

URL:
  <https://savannah.gnu.org/bugs/?60774>

                 Summary: make hangs on fcntl lock when using -O and stdout is
/dev/null
                 Project: make
            Submitted by: vapier
            Submitted on: Fri 11 Jun 2021 06:24:02 PM EDT
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: None
        Operating System: None
           Fixed Release: None
           Triage Status: None

    _______________________________________________________

Details:

i can reproduce this with make 4.2.1, 4.3, and current git
(012918bf11fbc2a94dc2319d15d05595c351b811) on Debian/Ubuntu systems.  my
reproduction:

$ wget https://busybox.net/downloads/busybox-1.32.1.tar.bz2
$ tar xf busybox-1.32.1.tar.bz2
$ cd busybox-1.32.1
# This works fine.
$ make -O -j32 defconfig
# This hangs indefinitely.
$ make -O -j32 defconfig >/dev/null

gdb shows the hang in:

(gdb) bt
#0  0x00007f10555c9643 in fcntl64 () from /lib64/libc.so.6
#1  0x00000000002225ff in acquire_semaphore () at output.c:267
#2  output_dump (out=out@entry=0x13a9744) at output.c:368
#3  0x000000000021b43a in reap_children (block=block@entry=0x1, err=<optimized
out>, err@entry=0x0) at job.c:937
#4  0x0000000000227c99 in update_goal_chain (goaldeps=<optimized out>) at
remake.c:112
#5  0x000000000021fa1b in main (argc=0x5, argv=0x7ffdd42b3478,
envp=0x7ffdd42b34a8) at main.c:2558

(gdb) f 1
#1  0x00000000002225ff in acquire_semaphore () at output.c:267
267       if (fcntl (sync_handle, F_SETLKW, &fl) != -1)

(gdb) list
262
263       fl.l_type = F_WRLCK;
264       fl.l_whence = SEEK_SET;
265       fl.l_start = 0;
266       fl.l_len = 1;
267       if (fcntl (sync_handle, F_SETLKW, &fl) != -1)
268         return &fl;
269       perror ("fcntl()");
270       return NULL;
271     }

strace confirms it:
286807 fcntl(1, F_SETLKW, {l_type=F_WRLCK, l_whence=SEEK_SET, l_start=0,
l_len=1}

full strace log attached in case it helps.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Fri 11 Jun 2021 06:24:02 PM EDT  Name: log.xz  Size: 443KiB   By: vapier

<http://savannah.gnu.org/bugs/download.php?file_id=51549>

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60774>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]