krakjoe/pthreads

php cli crashes

tobiastromm opened this issue · 3 comments

Hi.

I'm using pthreads on Windows Server 2016, it's working as expected, but sometimes it crash and I have to reopen my script.

Here is the error from eventvwr:

Nome do aplicativo com falha: php.exe, versão: 7.2.12.0, carimbo de data/hora: 0x5be3ce9a
Nome do módulo com falha: pthreadVC2.dll, versão: 2.9.1.0, carimbo de data/hora: 0x5a79c4e5
Código de exceção: 0xc0000005
Deslocamento da falha: 0x000000000000323a
ID do processo com falha: 0x460
Hora de início do aplicativo com falha: 0x01d4806f2ce97515
Caminho do aplicativo com falha: c:\php\php.exe
Caminho do módulo com falha: c:\php\pthreadVC2.dll
ID do Relatório: 002ebca2-e3ed-40fa-9690-f019171e3fdc
Nome completo do pacote com falha:
ID do aplicativo relativo ao pacote com falha:

Falha no bucket 1351663039016933752, tipo 4
Nome do Evento: APPCRASH
Resposta: Não disponível
ID do CAB: 0

Assinatura do problema:
P1: php.exe
P2: 7.2.12.0
P3: 5be3ce9a
P4: pthreadVC2.dll
P5: 2.9.1.0
P6: 5a79c4e5
P7: c0000005
P8: 000000000000323a
P9:
P10:

Arquivos anexados:
\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER3B2F.tmp.WERInternalMetadata.xml

Esses arquivos podem estar disponíveis em:
C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_php.exe_10d75118bb611351b6f4858881a640d2d18836d5_8d6394c3_0c94c31d

Símbolo da análise:
Verificando novamente solução: 0
ID do Relatório: 643a507b-32c4-4956-9267-a11fe18a1a9a
Status do Relatório: 0
Bucket com hash: c95a412fb15a8cd7b2c2125f60a11978

Version=1
EventType=APPCRASH
EventTime=131871452346913108
ReportType=2
Consent=1
UploadTime=131871452347893114
ReportIdentifier=5e4f113f-ec56-11e8-80f7-005056006f4f
IntegratorReportIdentifier=643a507b-32c4-4956-9267-a11fe18a1a9a
NsAppName=php.exe
AppSessionGuid=000013d4-0002-0009-de15-57374680d401
TargetAppId=W:000671d21b1c9489d12fb119b2ddb292c8a700000904!0000326c2a33087beb7f89c6715fb7d5d3d464c07071!php.exe
TargetAppVer=2018//11//08:05:50:18!2593c!php.exe
BootId=4294967295
Response.BucketId=c95a412fb15a8cd7b2c2125f60a11978
Response.BucketTable=4
Response.LegacyBucketId=1351663039016933752
Response.type=4
Sig[0].Name=Nome do Aplicativo
Sig[0].Value=php.exe
Sig[1].Name=Versão do Aplicativo
Sig[1].Value=7.2.12.0
Sig[2].Name=Carimbo de Data//Hora do Aplicativo
Sig[2].Value=5be3ce9a
Sig[3].Name=Nome do Módulo de Falhas
Sig[3].Value=pthreadVC2.dll
Sig[4].Name=Versão do Módulo de Falhas
Sig[4].Value=2.9.1.0
Sig[5].Name=Carimbo de Data//Hora do Módulo de Falhas
Sig[5].Value=5a79c4e5
Sig[6].Name=Código de Exceção
Sig[6].Value=c0000005
Sig[7].Name=Deslocamento de Exceção
Sig[7].Value=000000000000323a
DynamicSig[1].Name=Versão do sistema operacional
DynamicSig[1].Value=10.0.14393.2.0.0.272.79
DynamicSig[2].Name=Identificação da Localidade
DynamicSig[2].Value=1046
DynamicSig[22].Name=Informações Adicionais 1
DynamicSig[22].Value=c531
DynamicSig[23].Name=Informações Adicionais 2
DynamicSig[23].Value=c5312c4f986205deea57ae980d026405
DynamicSig[24].Name=Informações Adicionais 3
DynamicSig[24].Value=a35b
DynamicSig[25].Name=Informações Adicionais 4
DynamicSig[25].Value=a35bdc54699885fae56794c7399b624e
UI[2]=c:\php\php.exe
UI[3]=CLI parou de funcionar
UI[4]=O Windows pode verificar online se há uma solução para o problema.
UI[5]=Procurar solução online e fechar o programa
UI[6]=Verificar online mais tarde se há uma solução e fechar o programa
UI[7]=Fechar o programa
LoadedModule[0]=c:\php\php.exe
LoadedModule[1]=C:\Windows\SYSTEM32\ntdll.dll
LoadedModule[2]=C:\Windows\System32\KERNEL32.DLL
LoadedModule[3]=C:\Windows\System32\KERNELBASE.dll
LoadedModule[4]=C:\Windows\System32\WS2_32.dll
LoadedModule[5]=C:\Windows\System32\sechost.dll
LoadedModule[6]=C:\Windows\System32\RPCRT4.dll
LoadedModule[7]=C:\Windows\System32\SHELL32.dll
LoadedModule[8]=C:\Windows\System32\msvcrt.dll
LoadedModule[9]=C:\Windows\System32\cfgmgr32.dll
LoadedModule[10]=C:\Windows\System32\windows.storage.dll
LoadedModule[11]=c:\php\php7ts.dll
LoadedModule[12]=C:\Windows\System32\combase.dll
LoadedModule[13]=C:\Windows\System32\ucrtbase.dll
LoadedModule[14]=C:\Windows\System32\bcryptPrimitives.dll
LoadedModule[15]=C:\Windows\System32\powrprof.dll
LoadedModule[16]=C:\Windows\System32\advapi32.dll
LoadedModule[17]=C:\Windows\System32\shlwapi.dll
LoadedModule[18]=C:\Windows\System32\GDI32.dll
LoadedModule[19]=C:\Windows\System32\gdi32full.dll
LoadedModule[20]=C:\Windows\System32\USER32.dll
LoadedModule[21]=C:\Windows\System32\win32u.dll
LoadedModule[22]=C:\Windows\System32\kernel.appcore.dll
LoadedModule[23]=C:\Windows\System32\shcore.dll
LoadedModule[24]=C:\Windows\System32\profapi.dll
LoadedModule[25]=C:\Windows\SYSTEM32\VCRUNTIME140.dll
LoadedModule[26]=C:\Windows\SYSTEM32\CRYPTBASE.DLL
LoadedModule[27]=C:\Windows\System32\ole32.dll
LoadedModule[28]=C:\Windows\SYSTEM32\bcrypt.dll
LoadedModule[29]=C:\Windows\SYSTEM32\DNSAPI.dll
LoadedModule[30]=C:\Windows\System32\NSI.dll
LoadedModule[31]=C:\Windows\System32\IMM32.DLL
LoadedModule[32]=C:\Windows\SYSTEM32\IPHLPAPI.DLL
LoadedModule[33]=C:\php\ext\php_pthreads.dll
LoadedModule[34]=c:\php\pthreadVC2.dll
LoadedModule[35]=C:\php\ext\php_mysqli.dll
LoadedModule[36]=C:\php\ext\php_curl.dll
LoadedModule[37]=C:\Windows\System32\WLDAP32.dll
LoadedModule[38]=C:\Windows\System32\Normaliz.dll
LoadedModule[39]=c:\php\libssl-1_1-x64.dll
LoadedModule[40]=c:\php\libcrypto-1_1-x64.dll
LoadedModule[41]=c:\php\libssh2.dll
LoadedModule[42]=c:\php\nghttp2.dll
LoadedModule[43]=C:\Windows\System32\CRYPT32.dll
LoadedModule[44]=C:\Windows\System32\MSASN1.dll
LoadedModule[45]=C:\Windows\SYSTEM32\secur32.dll
LoadedModule[46]=C:\Windows\SYSTEM32\SSPICLI.DLL
LoadedModule[47]=C:\Windows\system32\mswsock.dll
LoadedModule[48]=C:\Windows\System32\rasadhlp.dll
LoadedModule[49]=C:\Windows\System32\fwpuclnt.dll
LoadedModule[50]=C:\Windows\SYSTEM32\CRYPTSP.dll
LoadedModule[51]=C:\Windows\system32\rsaenh.dll
State[0].Key=Transport.DoneStage1
State[0].Value=1
FriendlyEventName=Parou de funcionar
ConsentKey=APPCRASH
AppName=CLI
AppPath=c:\php\php.exe
NsPartner=windows
NsGroup=windows8
ApplicationIdentity=30268BEBAD133DAE93CD5D44CD6C888C
MetadataHash=-1897613616

tpunt commented

There's nothing we can do without seeing a small, self-contained code snippet reproducing the crash. I'll reopen this issue when you post one.

Here it is:

https://www.papinho.com/script.zip

Please note that, i wasn't using socket when I open that, but I am using now, so, that's not the problem.

The script run fine sometimes one, two days, then it stops. I see no error on php folder or on the openned cmd, even running with the options -d display_errors=1.

I always run the script over a loop, so if it crashes it will reboot, but, the problem is that since the error is outside the cmd window, it freezes until I click on the close button.

:inicio

c:\php\php -d display_errors=1 -f ws_server.php

goto inicio

tpunt commented

Reopening this at the request of @tobiastromm. Unfortunately, I don't have the time to look into this, and given that pthreads is being deprecated in favour of parallel, I'm not sure this will be fixed now...