https://bugs.winehq.org/show_bug.cgi?id=42793
Bug ID: 42793 Summary: max tcp connection threads is 580 Product: Wine Version: 2.5 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: mohammad1emadi1taj@gmail.com Distribution: ---
hi i'm using a port scanner in ubuntu 12.04 (KPortScaner 3) for scaning active hosts in network with certain port ( like 22 or 3128 or 3389 or .....)
the program opens successfully and works good but when i wanted to stop it i was freezing so i wanted to fogure out what's the problem because it just happened some time so i open the program from terminal by "wine64 APP_LOCAtion" at started reading the log i noticed that only it freezes when wine sayes "pipe: Too many open files" so i tested in different setting and i realized that it happens when the tcp thread is high i was working ok ok 400 or 500 thread but freezing on 600 i tested different theads and got that the maximume thread for tcp connection is 580 and when i set more the app freezes or crashes when it wants to go the other ip range or when i click on stop but i work ok on 580 thread or less
next i wanted to know is wine limiting it or the problem is some thing else so i opented two of the program from to differrent locations and set the thrread 500 on both of them and started scaning at the same time and it worked fine !! so i understooed that thw wine is limiting it to 580
next i changed wine like windows version (using winecfg ) or using wine 32-bit tryed other version including ver. 2 stable- 2.5 devel , 2.4 staging and wine 1.7 or even i compiled it myself both for amd64 and i386(i386 toke a lot of my time since it was tooo hard to compile ) i installed all of the needed and recommended library when compiling
but the problem didn't got fixed i scan on my didcated server that has a 10 gbps intternet connection so i need more thread
an other problem : wine could open nlbrute at all( you can download it by googling if you want to fix)(any way i use an oter program since nlbrute don't open using wine(tryed all of version above)
thanks a lot for reading (i know o extened the text a lot and wasted a lot of your time so sorry for that)
https://bugs.winehq.org/show_bug.cgi?id=42793
muh emadi taj mohammad1emadi1taj@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Priority|P2 |P4 Severity|normal |major Distribution|--- |Ubuntu
--- Comment #1 from muh emadi taj mohammad1emadi1taj@gmail.com --- the limit is not only for kportscan but for all tcp scaning apps
https://bugs.winehq.org/show_bug.cgi?id=42793
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|major |normal
https://bugs.winehq.org/show_bug.cgi?id=42793
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|max tcp connection threads |KPortScan 3.0 freezes when |is 580 |pressing Stop while a scan | |is running
--- Comment #2 from Bruno Jesus 00cpxxx@gmail.com --- It may still not be a Wine limitation, it could be a kernel resource limitation per process. I just did a test of opening 1024 TCP connections and it works fine in Wine. Then I downloaded the program KPortScan3 and did a 800 threads scan, I don't think the program is really doing 800 tests at the same time because the results counter increases very slowly. But I can see that it hangs when pressing stop. But it has with any number of threads here.
Maybe you could use nmap instead.
https://bugs.winehq.org/show_bug.cgi?id=42793
--- Comment #3 from Bruno Jesus 00cpxxx@gmail.com --- I see now that the program uses threads according to the IP range, if there is a single IP it uses a single threads, if there is a 100 IP in the range it will use 100 threads and so on until the limit specified.
https://bugs.winehq.org/show_bug.cgi?id=42793
--- Comment #4 from muh emadi taj mohammad1emadi1taj@gmail.com --- (In reply to Bruno Jesus from comment #2)
It may still not be a Wine limitation, it could be a kernel resource limitation per process. I just did a test of opening 1024 TCP connections and it works fine in Wine. Then I downloaded the program KPortScan3 and did a 800 threads scan, I don't think the program is really doing 800 tests at the same time because the results counter increases very slowly. But I can see that it hangs when pressing stop. But it has with any number of threads here.
Maybe you could use nmap instead.
yeah you can set thread to 1024 and i scans but doesn't stop as i said crashes when stoping that's because of the limit for seeing the limit open terminal adn type : wine /root/Desktop//../kportscan.exe(app location) and give it a large range (having at leat 10000 ips) now look at the terminal you see wine sayes in terminal : "wine client error:41c: pipe: Too many open files" if you set the thread more than 580 nad when you see this te app freezes when stoping it doesn't matter tat it freezes at stooping or going to nest line range ( if the problem was only this app i would use another app i've tested a few apps and it appens) what matters is that you can't have more than 580 tcp connection at the same time with one proccess in wine
i open two kportscanners at two diffrenet folder and gave than 400 treads each and i saw that it worked perfectly so the problem can't be "linux core limits the max tcp thread to 580" guy do you have any linux based app so you can test these apps and see if the problem exits if exist than the problem is from linux core not wine
thanks for helping
https://bugs.winehq.org/show_bug.cgi?id=42793
--- Comment #5 from muh emadi taj mohammad1emadi1taj@gmail.com --- (In reply to Bruno Jesus from comment #3)
I see now that the program uses threads according to the IP range, if there is a single IP it uses a single threads, if there is a 100 IP in the range it will use 100 threads and so on until the limit specified.
right if you have les tan 500 ip in range and choose the thread 500 the app can't use 500 threads because there is not 500 ip in list for calling at the same time
https://bugs.winehq.org/show_bug.cgi?id=42793
muh emadi taj mohammad1emadi1taj@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|KPortScan 3.0 freezes when |(max tcp connection thread |pressing Stop while a scan |is 580 in each wine |is running |proccess)KPortScan 3.0 | |freezes when pressing Stop | |while a scan is running
https://bugs.winehq.org/show_bug.cgi?id=42793
--- Comment #6 from Bruno Jesus 00cpxxx@gmail.com --- As I said I can open 1024 TCP connections inside Wine, I. So there may be a limit, but it is not a TCP connection limit. You could check ulimit -a to see if you have a file limit for example.
https://bugs.winehq.org/show_bug.cgi?id=42793
--- Comment #7 from Bruno Jesus 00cpxxx@gmail.com ---
... type : wine /root/Desktop//../kportscan.exe(app location)
If you are running wine as root and specially using this sort of tool you are doing it wrong. This tool can be downloaded mostly from hacking forums and it could have been changed to add malware/trojan, please never run wine as root.
https://bugs.winehq.org/show_bug.cgi?id=42793
--- Comment #8 from muh emadi taj mohammad1emadi1taj@gmail.com --- (In reply to Bruno Jesus from comment #6)
As I said I can open 1024 TCP connections inside Wine, I. So there may be a limit, but it is not a TCP connection limit. You could check ulimit -a to see if you have a file limit for example.
thanks alot i checked the limits using ulimit -a i had 2048 file limit so i rased to 20000 and the problem got sloved
i don't know how to thank you i really appreciate your help if you wasn't maybe i couldn't sove the problem ever (because i didn't know that tings like number of proccess add open files or allocated memory size by one proccess can be limited in linux)(in fact i'm newbi to linux i've started working by linux since a month ago) thanks aloooooooooooooottttt
https://bugs.winehq.org/show_bug.cgi?id=42793
--- Comment #9 from muh emadi taj mohammad1emadi1taj@gmail.com --- (In reply to Bruno Jesus from comment #7)
... type : wine /root/Desktop//../kportscan.exe(app location)
If you are running wine as root and specially using this sort of tool you are doing it wrong. This tool can be downloaded mostly from hacking forums and it could have been changed to add malware/trojan, please never run wine as root.
thanks for you're advise i check every tool before running (not at virustotal.com because RATs(torjan)s can easily become nud and not detected by simple crypting ( i and anyone else use a cryptor to crypt our torjan when we want to give it to client so it wont be detected by anti viruses at least for a month (in a month some people scan in online sites like virustotal and when you scan in that kind of site a report will be given to anti-virus campany to check the file when it's scanned afew times and they will detect it easily )
i run any tool in a virtual machine and check the tcp connections from out of the machine and see if there is a rat or not(if you check inside the machine some tools can't be detected like rootkits that hide their proccess and connection but in out of the machine everything will be detected even rootkits ) i recommend you to this too ( notice that some malwares don't run when running inside a virtual machine (they check and see if any app related to virtualization is installed like vmware_tools or ...) so don't install thoese tools (100% security never exists )
again thanks for your advice and help
https://bugs.winehq.org/show_bug.cgi?id=42793
muh emadi taj mohammad1emadi1taj@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED
--- Comment #10 from muh emadi taj mohammad1emadi1taj@gmail.com --- problem fixed by using "ulimit -u 20000*" and the limit was from ubuntu not wine (for these who find this problem later and check this issue )
https://bugs.winehq.org/show_bug.cgi?id=42793
--- Comment #11 from muh emadi taj mohammad1emadi1taj@gmail.com --- (In reply to muh emadi taj from comment #10)
problem fixed by using "ulimit -u 20000*" and the limit was from ubuntu not wine (for these who find this problem later and check this issue )
***ulimit -n**
https://bugs.winehq.org/show_bug.cgi?id=42793
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|(max tcp connection thread |KPortScan 3.0 freezes when |is 580 in each wine |pressing Stop while a scan |proccess)KPortScan 3.0 |is running due to overuse |freezes when pressing Stop |of system resources |while a scan is running | Resolution|FIXED |INVALID
--- Comment #12 from Bruno Jesus 00cpxxx@gmail.com --- Thanks for your recommendations. I'm resolving this bug as invalid because the problem was not in Wine, the fixed state is for when something in Wine code is changed to address an issue.
https://bugs.winehq.org/show_bug.cgi?id=42793
Frédéric Delanoy frederic.delanoy@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #13 from Frédéric Delanoy frederic.delanoy@gmail.com --- Closing INVALID bugs