unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#48591: ugrep: illegal instruction
@ 2021-05-22 20:19 Christopher Howard
  2021-05-22 22:46 ` Christopher Howard
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Christopher Howard @ 2021-05-22 20:19 UTC (permalink / raw)
  To: 48591

[-- Attachment #1: Type: text/plain, Size: 2192 bytes --]

Hi, I found another package, ugrep, which is evidently using native
instructions that do not work on my processor. When I run ugrep (e.g.,
`ugrep -Q') it immediately dies with error 'illegal instruction'.
However, if I pull the source with `guix build -S' and build and
install it to a local directory, it runs without trouble.

I'm sure this will also be a reproducibility bug, and plan on
submitting guix challenge results. However, the command I am running to
rebuild ugrep without grafts or substitutes is rebuilding everything
all the way back to bootstrap, so it probably will not be completed for
a day or two:

guix gc -D $(guix build --no-grafts ugrep); guix build --no-substitutes 
ugrep

Please compare similar bug 48373. It didn't seem worth the trouble of
running an object dump and figuring out which instruction is illegal,
but I could do that if required.

My system information:


christopher@nightshade ~$ grep 'flags' /proc/cpuinfo | head -n 1
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext
fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl
nonstop_tsc cpuid extd_apicid pni monitor cx16 popcnt lahf_lm
cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch
osvw ibs skinit wdt hw_pstate vmmcall npt lbrv svm_lock nrip_save

christopher@nightshade ~$ neofetch --stdout
christopher@nightshade 
---------------------- 
OS: Guix System d4ffa9630277fa8699c783c08381d688626d4bc3 x86_64 
Host: GA-880GM-UD2H 
Kernel: 5.12.5-gnu 
Uptime: 1 hour, 30 mins 
Packages: 107 (guix-system), 93 (guix-user) 
Shell: bash 5.0.16 
Resolution: 1920x1200 
DE: GNOME 3.34.5 
Theme: Adwaita [GTK2/3] 
Icons: Adwaita [GTK2/3] 
Terminal: kitty 
CPU: AMD Athlon II X3 455 (3) @ 3.300GHz 
GPU: NVIDIA GeForce 8400 GS Rev. 3 
Memory: 1573MiB / 7957MiB 

christopher@nightshade ~$ guix describe
Generation 5	May 22 2021 09:43:30	(current)
  guix d4ffa96
    repository URL: https://git.savannah.gnu.org/git/guix.git
    branch: master
    commit: d4ffa9630277fa8699c783c08381d688626d4bc3


-- 
Christopher Howard
blog: https://librehacker.com
social: https://gnusocial.club/librehacker

[-- Attachment #2: Type: text/html, Size: 3235 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#48591: ugrep: illegal instruction
  2021-05-22 20:19 bug#48591: ugrep: illegal instruction Christopher Howard
@ 2021-05-22 22:46 ` Christopher Howard
  2021-05-24 17:22 ` Leo Famulari
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Christopher Howard @ 2021-05-22 22:46 UTC (permalink / raw)
  To: 48591

[-- Attachment #1: Type: text/plain, Size: 568 bytes --]

christopher@nightshade ~$ guix challenge ugrep
/gnu/store/a6x7rv7xi3d2pw205znmnha9qfjrvs7k-ugrep-3.1.12 contents
differ:
  local hash: 1yf9752hprihmhwnqlhaffkmwmkd3scwzr8dqy7d78vcy70qjkn6
  
https://ci.guix.gnu.org/nar/lzip/a6x7rv7xi3d2pw205znmnha9qfjrvs7k-ugrep-3.1.12
: 1ifdjmscb07pacxwcs2408zi12yrxxf0zdwzz800xlccp5x53m7r
  differing file:
    /bin/ugrep

1 store items were analyzed:
  - 0 (0.0%) were identical
  - 1 (100.0%) differed
  - 0 (0.0%) were inconclusive

-- 
Christopher Howard
blog: https://librehacker.com
social: https://gnusocial.club/librehacker

[-- Attachment #2: Type: text/html, Size: 1127 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#48591: ugrep: illegal instruction
  2021-05-22 20:19 bug#48591: ugrep: illegal instruction Christopher Howard
  2021-05-22 22:46 ` Christopher Howard
@ 2021-05-24 17:22 ` Leo Famulari
  2021-06-30 21:41   ` raingloom
  2021-07-02 11:24 ` zimoun
  2023-01-17  1:37 ` bug#48591: ugrep: reproducibility issues kiasoc5 via Bug reports for GNU Guix
  3 siblings, 1 reply; 8+ messages in thread
From: Leo Famulari @ 2021-05-24 17:22 UTC (permalink / raw)
  To: Christopher Howard; +Cc: 48591

On Sat, May 22, 2021 at 12:19:30PM -0800, Christopher Howard wrote:
> However, the command I am running to
> rebuild ugrep without grafts or substitutes is rebuilding everything
> all the way back to bootstrap, so it probably will not be completed for
> a day or two:
> 
> guix gc -D $(guix build --no-grafts ugrep); guix build --no-substitutes 
> ugrep

Do this instead:

$ guix environment --no-grafts ugrep -- guix build --no-grafts --no-substitutes ugrep

That way, you can use substitutes for ugrep's dependencies, but then
build ugrep from source.

I hope it helps!




^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#48591: ugrep: illegal instruction
  2021-05-24 17:22 ` Leo Famulari
@ 2021-06-30 21:41   ` raingloom
  2021-07-02  2:23     ` Leo Famulari
  0 siblings, 1 reply; 8+ messages in thread
From: raingloom @ 2021-06-30 21:41 UTC (permalink / raw)
  To: Leo Famulari; +Cc: 48591, Christopher Howard

On Mon, 24 May 2021 13:22:23 -0400
Leo Famulari <leo@famulari.name> wrote:

> On Sat, May 22, 2021 at 12:19:30PM -0800, Christopher Howard wrote:
> > However, the command I am running to
> > rebuild ugrep without grafts or substitutes is rebuilding everything
> > all the way back to bootstrap, so it probably will not be completed
> > for a day or two:
> > 
> > guix gc -D $(guix build --no-grafts ugrep); guix build
> > --no-substitutes ugrep  
> 
> Do this instead:
> 
> $ guix environment --no-grafts ugrep -- guix build --no-grafts
> --no-substitutes ugrep
> 
> That way, you can use substitutes for ugrep's dependencies, but then
> build ugrep from source.
> 
> I hope it helps!
> 
> 
> 

TIL about that. There really ought to be a more obvious way to do that.




^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#48591: ugrep: illegal instruction
  2021-06-30 21:41   ` raingloom
@ 2021-07-02  2:23     ` Leo Famulari
  0 siblings, 0 replies; 8+ messages in thread
From: Leo Famulari @ 2021-07-02  2:23 UTC (permalink / raw)
  To: raingloom; +Cc: 48591, Christopher Howard

On Wed, Jun 30, 2021 at 11:41:11PM +0200, raingloom wrote:
> TIL about that. There really ought to be a more obvious way to do that.

Agreed! It's a common use case.




^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#48591: ugrep: illegal instruction
  2021-05-22 20:19 bug#48591: ugrep: illegal instruction Christopher Howard
  2021-05-22 22:46 ` Christopher Howard
  2021-05-24 17:22 ` Leo Famulari
@ 2021-07-02 11:24 ` zimoun
  2023-01-17  1:37 ` bug#48591: ugrep: reproducibility issues kiasoc5 via Bug reports for GNU Guix
  3 siblings, 0 replies; 8+ messages in thread
From: zimoun @ 2021-07-02 11:24 UTC (permalink / raw)
  To: Christopher Howard; +Cc: 48591

Hi,

On Sat, 22 May 2021 at 12:19, Christopher Howard <christopher@librehacker.com> wrote:

> I'm sure this will also be a reproducibility bug,

Indeed, the package ’ugrep’ is not reproducible:

 guix build ugrep --no-grafts -q
 guix build ugrep --no-grafts -q --check -K
 diff --no-dereference -r /gnu/store/a6x7rv7xi3d2pw205znmnha9qfjrvs7k-ugrep-3.1.12{,-check}
 Binary files /gnu/store/a6x7rv7xi3d2pw205znmnha9qfjrvs7k-ugrep-3.1.12/bin/ugrep and /gnu/store/a6x7rv7xi3d2pw205znmnha9qfjrvs7k-ugrep-3.1.12-check/bin/ugrep differ

The next step is to investigate with diffoscope.


Well, another data point – maybe Berlin has an issue – because I get:

  guix challenge ugrep --substitute-urls="https://ci.guix.gnu.org https://bordeaux.guix.gnu.org"
  /gnu/store/a6x7rv7xi3d2pw205znmnha9qfjrvs7k-ugrep-3.1.12 contents differ:
    local hash: 1ifdjmscb07pacxwcs2408zi12yrxxf0zdwzz800xlccp5x53m7r
    https://ci.guix.gnu.org/nar/lzip/a6x7rv7xi3d2pw205znmnha9qfjrvs7k-ugrep-3.1.12: 1ifdjmscb07pacxwcs2408zi12yrxxf0zdwzz800xlccp5x53m7r
    https://bordeaux.guix.gnu.org/nar/lzip/a6x7rv7xi3d2pw205znmnha9qfjrvs7k-ugrep-3.1.12: 1yf9752hprihmhwnqlhaffkmwmkd3scwzr8dqy7d78vcy70qjkn6

  guix hash -r $(guix build --no-grafts ugrep)-check
  1yf9752hprihmhwnqlhaffkmwmkd3scwzr8dqy7d78vcy70qjkn6

I fetch by default the substitutes from ci that why “local hash“ and ci
are the same; but my local build with ‘guix build --check’ gives the
same hash as bordeaux.


All the best,
simon




^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#48591: ugrep: reproducibility issues
  2021-05-22 20:19 bug#48591: ugrep: illegal instruction Christopher Howard
                   ` (2 preceding siblings ...)
  2021-07-02 11:24 ` zimoun
@ 2023-01-17  1:37 ` kiasoc5 via Bug reports for GNU Guix
  2024-10-24 19:04   ` Vagrant Cascadian
  3 siblings, 1 reply; 8+ messages in thread
From: kiasoc5 via Bug reports for GNU Guix @ 2023-01-17  1:37 UTC (permalink / raw)
  To: 48591

Is this bug fixed yet?

If not, seeing that this issue was motivated by an illegal instruction, 
we can use compile flags to disable SSE and other platform-dependent 
optimizations and investigate further.

WDYT?

https://github.com/Genivia/ugrep#other-platforms-step-3-build




^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#48591: ugrep: reproducibility issues
  2023-01-17  1:37 ` bug#48591: ugrep: reproducibility issues kiasoc5 via Bug reports for GNU Guix
@ 2024-10-24 19:04   ` Vagrant Cascadian
  0 siblings, 0 replies; 8+ messages in thread
From: Vagrant Cascadian @ 2024-10-24 19:04 UTC (permalink / raw)
  To: 48591; +Cc: kiasoc5, Christopher Howard, zimoun, raingloom, Leo Famulari

[-- Attachment #1: Type: text/plain, Size: 1052 bytes --]

On 2023-01-16, kiasoc5 wrote:
> Is this bug fixed yet?
>
> If not, seeing that this issue was motivated by an illegal instruction, 
> we can use compile flags to disable SSE and other platform-dependent 
> optimizations and investigate further.
>
> WDYT?
>
> https://github.com/Genivia/ugrep#other-platforms-step-3-build

--disable-sse2 disable SSE2 and AVX optimizations
--disable-avx2 disable AVX2 and AVX512BW optimizations, but compile with SSE2 when supported
--disable-neon disable ARM NEON/AArch64 optimizations

Seems like --disable-sse2 on x86_64 and x86 (32-bit) and --disable-neon
(armhf, maybe aarch64) would be needed to make the build independent of
which cpu it runs on.


FWIW, debian disables several of these (--disable-sse2 and
--disable-neon), although also passes --disable-avx which is not mentioned in
the upstream documentation, although is present in configure.ac...

  https://salsa.debian.org/debian/ugrep/-/blob/7e2383dfaec23d58587f53c31ce46ef884513975/debian/rules#L5-13


live well,
  vagrant

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-10-24 19:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-22 20:19 bug#48591: ugrep: illegal instruction Christopher Howard
2021-05-22 22:46 ` Christopher Howard
2021-05-24 17:22 ` Leo Famulari
2021-06-30 21:41   ` raingloom
2021-07-02  2:23     ` Leo Famulari
2021-07-02 11:24 ` zimoun
2023-01-17  1:37 ` bug#48591: ugrep: reproducibility issues kiasoc5 via Bug reports for GNU Guix
2024-10-24 19:04   ` Vagrant Cascadian

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).