Bug 14639

Summary: Squid will not start; exits immediately with message "Illegal Instruction"
Product: Mageia Reporter: Guy Gallagher <guy.gallagher>
Component: RPM PackagesAssignee: Mageia Bug Squad <bugsquad>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Normal CC: cjw, guy.gallagher, luigiwalser
Version: Cauldron   
Target Milestone: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Source RPM: squid-3.4.9-1.mga5.src.rpm CVE:
Status comment:
Attachments: Output of cpuinfo --debug
Output of systemctl status squid.service -l > squid.errors

Description Guy Gallagher 2014-11-21 21:56:24 CET
Description of problem: Squid service fails to start, exits with message "Illegal Instruction".


Version-Release number of selected component (if applicable): squid-3.4.9-1.mga5


How reproducible: Start the squid service with command "systemctl start squid.service", or start the service from the MCC GUI, or enable Parental controls (which requires squid).


Steps to Reproduce:
1. Start the squid service
2.
3.

This is the output of squid startup:
[root@MusicStudio x86_64]# systemctl start squid.service
Illegal Instruction
[root@MusicStudio x86_64]# systemctl start squid.service


Upstream chatter suggests that config option disable-arch-native is required to fix this issue; I have confirmed this as follows:

1. Remove official packages (urpme squid-3.4.9*)
2. Download source rpm
3. Build new rpm packages: 
[gallaghg@MusicStudio Downloads]$ rpmbuild --rebuild squid-3.4.9-1.mga5.src.rpm --with=disable-arch-native
4. As root, install the three rpms generated by the rpm build:
[root@MusicStudio x86_64]# urpmi ./squid-3.4.9-1.mga5.x86_64.rpm
[root@MusicStudio x86_64]# urpmi ./squid-cachemgr-3.4.9-1.mga5.x86_64.rpm
[root@MusicStudio x86_64]# urpmi ./squid-debuginfo-3.4.9-1.mga5.x86_64.rpm

Squid now starts properly:
[root@MusicStudio x86_64]# systemctl start squid.service
[root@MusicStudio x86_64]# ps -ef|grep squid
root      3309     1  0 15:18 ?        00:00:00 squid
squid     3312  3309  0 15:18 ?        00:00:00 (squid-1)
squid     3313  3312  0 15:18 ?        00:00:00 (logfile-daemon) /var/log/squid/access.log
squid     3314  3312  0 15:18 ?        00:00:00 (pinger)
root      6465  2883  0 15:52 pts/4    00:00:00 grep --color squid




Reproducible: 

Steps to Reproduce:
Comment 1 David Walser 2014-11-21 22:31:00 CET
There's no arch-native option in the SPEC file.  I would be surprised if upstream was talking about an RPM option.  Do you have a reference to this upstream "chatter"?  Official packages are not built with rpmbuild such that we can pass options that way, if that actually does something, although I don't see anything like that documented in the rpmbuild manpage and usually --with options enable things that are in the SPEC file, and again, no such thing exists in ours.  Maybe it was the simple act of rebuilding the squid package that fixed it for you, and the option didn't actually do anything.  Can you try that?  If so, we can rebuild it on the build system.

CC: (none) => luigiwalser

Comment 2 Guy Gallagher 2014-11-21 23:06:42 CET
I used rpmbuild to avoid compiling from source, it's just simpler. The option disable-arch-native belings in the config file as indicated here: http://wiki.squid-cache.org/KnowledgeBase/IllegalInstructionError
Comment 3 David Walser 2014-11-21 23:12:37 CET
I wasn't trying to encourage you to build from source or discourage you from using rpmbuild, in fact using rpmbuild again is what I wanted.  I was just pointing out that in the build system we can't use a --with option to rpmbuild because that's now how the RPMs are built.

Anyway, as I suspected, the --with option wasn't doing anything anyway, so it was the simple act of rebuilding that fixed it for you.  A --with rpmbuild option won't add options to the configure call (which is what the Squid KB article was suggesting) unless the SPEC file is written to make it do that.

I've submitted a rebuild to the build system.  Please confirm that squid-3.4.9-2.mga5 fixes the issue.  Thanks for the report.
Comment 4 Guy Gallagher 2014-11-21 23:27:58 CET
Thanks, that was quick! New version hasn't hit the mirrors yet, I'll confirm as soon as the updated version is available. And, apologies for misunderstanding your request.
Comment 5 Guy Gallagher 2014-11-22 01:03:07 CET
Created attachment 5629 [details]
Output of cpuinfo --debug
Comment 6 Guy Gallagher 2014-11-22 01:04:11 CET
Created attachment 5630 [details]
Output of systemctl status squid.service -l > squid.errors

CC: (none) => guy.gallagher

Comment 7 Guy Gallagher 2014-11-22 01:06:08 CET
Sad to say, squid-3.4.9-2.mga5 produces the same results on my workstation. Two files are attached; here is the version information:

[root@MusicStudio ~]# rpm -qa|grep squid
squid-cachemgr-3.4.9-2.mga5
Comment 8 Christiaan Welvaart 2014-11-22 06:37:04 CET
The gcc option -march=native compiles for the specific CPU in the build machine which is not appropriate for OS vendors like Mageia. We decide what hardware we want to support and this is not simply the specific hardware we happen to use for building our packages. So we must indeed disable use of this option in the squid package.

The problem should be fixed with squid-3.4.9-3.mga5 .

CC: (none) => cjw

Comment 9 Guy Gallagher 2014-11-22 14:59:54 CET
Confirmed, squid-3.4.9-3.mga5 resolves this issue. Thanks.
Comment 10 Guy Gallagher 2014-11-22 15:01:51 CET
Confirmed, squid-3.4.9-3.mga5 resolves this issue.

[gallaghg@MusicStudio ~]$ ps -ef|grep squid
root      3478     1  0 08:56 ?        00:00:00 squid
squid     3481  3478  0 08:56 ?        00:00:00 (squid-1)
squid     3573  3481  0 08:57 ?        00:00:00 (logfile-daemon) /var/log/squid/access.log
squid     3574  3481  0 08:57 ?        00:00:00 (pinger)
gallaghg  8177  8133  0 09:00 pts/1    00:00:00 grep --color squid
[gallaghg@MusicStudio ~]$ rpm -qa|grep squid
squid-cachemgr-3.4.9-3.mga5

Status: NEW => RESOLVED
Resolution: (none) => FIXED