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

Squid 4.14 for Windows runs into stackdumpfile #101

Open
christianjungwirth opened this issue Aug 24, 2021 · 13 comments
Open

Squid 4.14 for Windows runs into stackdumpfile #101

christianjungwirth opened this issue Aug 24, 2021 · 13 comments

Comments

@christianjungwirth
Copy link

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

@ra-at-diladele-com
Copy link
Contributor

It is same as #95

@christianjungwirth
Copy link
Author

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
Copy link
Contributor

ra-at-diladele-com commented Aug 24, 2021 via email

@christianjungwirth
Copy link
Author

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

@ra-at-diladele-com
Copy link
Contributor

ra-at-diladele-com commented Aug 25, 2021 via email

@christianjungwirth
Copy link
Author

christianjungwirth commented Sep 8, 2021

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?

@zepingouin
Copy link

zepingouin commented Jan 31, 2023

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 src/tools.cc file (just 3 lines to edit by removing && !_SQUID_CYGWIN_ at the end).

Open a Cygwin Terminal as user then 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 --enable-build-info='Cygwin Windows 10'
 --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 take a coffee, nap, etc... (-j4 option is for a 4 core CPU, adapt to yours):
make -j4

Run install and wait some minutes:
make -j4 install

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

Open a Cygwin Terminal as Administrator, then 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

@Swe-HimelRana
Copy link

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

@zepingouin
Copy link

zepingouin commented Feb 23, 2023

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.le-cycliste.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.

@zepingouin
Copy link

zepingouin commented Jul 25, 2023

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

Edit for Squid 6.3 and above:
/bin/squid/squidclient cache_object://localhost/squid-internal-mgr/info

@Eboubaker
Copy link

Eboubaker commented Apr 15, 2024

@zepingouin We dont have cygwin can you simply attach your modified compiled exe here in a zip?

@zepingouin
Copy link

zepingouin commented Apr 21, 2024

@Eboubaker You can download compiled files at ftp://ftp.le-cycliste.fr, however these exe files won't work without Cygwin libraries.

@el-guapo-rick
Copy link

el-guapo-rick commented Jun 9, 2024

@ra-at-diladele-com

I have the same cygwin_exception::open_stackdumpfile: Dumping stack trace to squid.exe.stackdump
issue on Windows 10 after installing Squid Proxy for Windows (MSI installer).

You mentioned this:


Our repo does not include Squid itself, just the MSI installer files – you need to download the Squid from Squid developers at http://www.squid-cache.org/; then compile binaries and replace those we have in the repo with your versions. Then compile.


What does that mean?
The MSI installs Squid folder on the C drive.
You cannot compile a Unix package on Windows unless you are using Cygwin.
But it's a totally different way to install an app than just installing an MSI.

I would appreciate if you could clarify that.

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants