Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bear causes unxz to fail when unpacking a .tar.xz #444

Open
moyix opened this issue Feb 5, 2022 · 2 comments
Open

Bear causes unxz to fail when unpacking a .tar.xz #444

moyix opened this issue Feb 5, 2022 · 2 comments
Labels
Projects

Comments

@moyix
Copy link

moyix commented Feb 5, 2022

Describe the bug

For reasons I can't quite figure out, bear causes tar (or more specifically, the unxz process it launches) to fail when unpacking the following .tar.xz file:
https://moyix.net/~moyix/qemu_6.2+dfsg.orig.tar.xz

To Reproduce

With the latest bear from git:

moyix@isabella:/fastdata$ tar tf qemu_6.2+dfsg.orig.tar.xz > /dev/null # Succeeds
moyix@isabella:/fastdata$ bear -- tar tf qemu_6.2+dfsg.orig.tar.xz > /dev/null # Fails
tar: Child returned status 1
tar: Error is not recoverable: exiting now

Expected behavior

The tar command should run successfully under bear.

Environment:

  • OS name: Linux
  • OS version: Ubuntu 20.04
  • OS architecture: x86_64
  • Bear version: bear 3.0.19
  • Bear install method: tested both building source and using the packages in debian unstable (bear 3.0.18)

Additional context

  • Can you give us a reference to the project that you are running against this tool? This command fails as part of using bear to wrap apt-get -b source qemu on debian unstable.
  • What build tools this project is using? QEMU uses meson, but the package build fails before it starts trying to build QEMU itself.
  • What architecture you are trying to compile for? x86_64 (no cross compile)
  • Could you attach build logs? Attached: bear_untar.log

Before you send...

  • Have you read the README.md file or man bear? Yes
  • Have you looked what other open issues Bear has? Yes
  • Are you sure that the build works without Bear? Yes
@moyix
Copy link
Author

moyix commented Feb 5, 2022

Note that the (somewhat ancient) version of bear in Ubuntu 20.04 does work fine here:

moyix@isabella:/fastdata$ bear --version
bear 2.4.3
moyix@isabella:/fastdata$ bear tar tf qemu_6.2+dfsg.orig.tar.xz > /dev/null # Succeeds
moyix@isabella:/fastdata$

@rizsotto
Copy link
Owner

rizsotto commented Feb 5, 2022

Thanks @moyix , this is a good catch!

The new version of Bear is spawning a supervisor process for each process execution. The old version was just record the execution attempt and executed the requested process. The new approach allow us to capture the exit codes, or emit other metrics about the execution... But it probably has a bug about the standard input/output redirection.

I've run a few tests now, with bzip2 it works just fine. Will need some time to find fix for this bug. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
3.0 fixes
  
To do
Development

No branches or pull requests

2 participants