diladele/squid-windows

Squid 4.14 for Windows runs into stackdumpfile

christianjungwirth opened this issue · 13 comments

Hello,

i have installed Squid 4.14 for Windows on a Windows Server 2016 Standard.
Everytime i start the squid cmd and type for exampel squid.exe version i get the following massage:

11 [main] squid 410 cygwin_exception::open_stackdumpfile: Dumping stack trace to squid.exe.stackdump

When i open the stackdumpfile it contains this:

Exception: STATUS_ILLEGAL_INSTRUCTION at rip=0010053816B
rax=00000001802BB250 rbx=00000008000772D0 rcx=00000001802BBA50
rdx=0000000000000004 rsi=0000000100944AC0 rdi=000000080006BA70
r8 =00000001802BB1C0 r9 =000308FFFFFFFFFF r10=0000000100000000
r11=00000003FBB38F42 r12=000000080006BA50 r13=000000080006BA50
r14=0000000800070C00 r15=0000000000000076
rbp=0000000100A24210 rsp=00000000FFFFC3F0
program=C:\Squid\bin\squid.exe, pid 410, thread main
cs=0033 ds=002B es=002B fs=0053 gs=002B ss=002B
Stack trace:
Frame        Function    Args
00100A24210  0010053816B (0010070BE9D, 00800077290, 0080006BA50, 0080006BA50)
00100A24210  001005381C3 (00000000006, 00000000006, 00800070C00, 00000000076)
00100A24210  0010070ACE9 (00800077290, 00000000006, 00800070C00, 00800077290)
00100A24210  0010070AECE (00800070C00, 00000000076, 001801C7EC5, 00800077290)
00100A24210  0010071086A (00100A923B0, 0000000001A, 00100944AC0, 00100A24230)
00100A24210  0010071120A (00100A7F2C0, 00100944AC0, 0000000001A, 00100A7F2C0)
00100A24210  00100711759 (00100A24230, 00100A24210, 00000000000, 00100A2E460)
00100A24210  00100407D3A (001008349FC, 001008385DB, 00100A2CA40, 01900A7F2C0)
00100A24210  00100421449 (0010063CA58, 00100A90BC0, 00000000028, 00000000028)
00100A24210  001004224CC (00100404E60, 00100944AC0, 00000000000, 00100834540)
00000000000  001004FEB22 (00000000000, 000FFFFCCE0, 000FFFFCC60, 000FFFFCC80)
000FFFFCCE0  00100827B1A (00000000020, 8080808080808080, 00180049E91, 000FFFFCC80)
000FFFFCCE0  00180049EFD (00000000000, 00000000000, 00000000000, 00000000000)
000FFFFFFF0  00180047856 (00000000000, 00000000000, 00000000000, 00000000000)
000FFFFFFF0  00180047904 (00000000000, 00000000000, 00000000000, 00000000000)
End of stack trace

I have already reinstalled it, checked the config file and try squid -k parse but this runs in the same error.

Does anybody know this issue?

Best regards
Christian

It is same as #95

thanks for your quick answer.

but do i write --disable-arch-native in the squid.conf? and then run squid.exe -k parse?

ra-at-diladele-com, thank you for your answer, but allow me this stupid question:

I download the the project from github, download cygwin, install the required packages.

But which directory i have to compile?

thank you for your support in advance.

best regards
Christian

Hello,

sorry for my late answer.

This week I want to rebuild the squid with the cygwin terminal.

But everytime when I do the make command, I get some errors at the end, like this in the picture.


bild

Do you have a tip for me, what I do wrong?

I succeeded in building and running Squid with Cygwin on Windows 10.

I downloaded source code from Squid sources, was squid-5.7

I used this archived wiki as starting base.

Manually applied the patch on tools.cc file (just 3 lines to modify).

Run configure and wait some minutes (written as ONE line !) :

./configure --disable-arch-native --bindir=/bin/squid --sbindir=/usr/sbin/squid
 --sysconfdir=/etc/squid --datadir=/usr/share/squid --libexecdir=/usr/lib/squid
 --disable-strict-error-checkin --with-logdir=/var/log/squid
 --with-swapdir=/var/cache/squid --with-pidfile=/var/run/squid.pid --enable-ssl
 --enable-delay-pools --enable-ssl-crtd --enable-icap-client --enable-esi --disable-eui
 --localstatedir=/var/run/squid --sharedstatedir=/var/run/squid
 --datarootdir=/usr/share/squid --enable-disk-io="AIO,Blocking,DiskThreads,IpcIo,Mmapped"
 --enable-auth-basic="DB,LDAP,NCSA,POP3,RADIUS,SASL,SMB,fake,getpwnam"
 --enable-auth-ntlm='fake' --enable-auth-negotiate='kerberos,wrapper'
 --enable-external-acl-helpers='LDAP_group,SQL_session,eDirectory_userip,file_userip,kerberos_ldap_group,session,time_quota,unix_group,wbinfo_group'
 --with-openssl --with-filedescriptors=65536 --enable-removal-policies="lru,heap"

Edit config.status file and change these 4 define by replacing " 1" with " 0" :

D["HAVE_MEMRCHR"]=" 0"
D["HAVE_SCHED_GETAFFINITY"]=" 0"
D["HAVE_SCHED_SETAFFINITY"]=" 0"
D["HAVE_CPU_AFFINITY"]=" 0"

Run make and wait some hours :
make

Run install and wait some minutes :
make install

Edit squid.conf if needed and init cache :
/usr/sbin/squid/squid -z

Open a Cygwin Terminal as Administrator and install Squid as a Windows service :
Feel free to modify the description :-)

cygrunsrv -I 'squid' -d 'CYGWIN Squid'
 -f 'Proxy compiled on this computer'
 -p /usr/sbin/squid/squid.exe
 -a '-N' -y tcpip --type auto

Start the service :
cygrunsrv -S squid

You should have a Squid proxy working !
/bin/squid/squidclient mgr:info

@zepingouin Bro. Can you please share your compiled version. or explain what to do in tools.cc file?

As stated above, I used this archived wiki as starting base. From there, you can download the patch for tools.cc file but as it is for squid-3.5.11 release, you need to manually edit the 3 lines by removing && !_SQUID_CYGWIN_ at the end. Use search in your editor to find these lines in tools.cc file.

Otherwise, I compiled squid-5.7 and you can download the archive at ftp://ftp.lunique.fr/squid-5.7.tar.bz2.
Open a Cygwin Terminal :

tar jxf squid-5.7.tar.bz2
cd squid-5.7

Follow the instructions starting at make install as stated above.

Edit for Squid 6.1

Apply this patch to src/base/RandomUuid.cc

Use this command instead of mgr:info
/bin/squid/squidclient cache_object://localhost/info