Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • A arachni
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 125
    • Issues 125
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 8
    • Merge requests 8
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Arachni - Web Application Security Scanner Framework
  • arachni
  • Issues
  • #963
Closed
Open
Issue created Apr 03, 2018 by Administrator@rootContributor

Connections in CLOSE_WAIT cause a hang

Created by: ordinaehs

I started a scan on a remote website, only to come back the next day with the OS (Kali Linux up-to-date; I was using Arachni 1.5.1 downloaded from the website) in an almost unusable state. Memory usage was extreme (one of the Ruby instances was using more than 2G of memory), sending the OS into swapping death. Arachni was reporting time outs in handling some Javascript events. I managed to get a CTRL+C to Arachni, which reported that it was aborting the scan, but then pretty much froze. Netstat was showing 115 connections to the remote website, all in a CLOSE_WAIT state, and they remained in that state for over two hours.

I suspect that the remote site wasn't handling the load, and failed to properly close several TCP connections. Arachni appears not to handle this, causing sockets to get stuck in a CLOSE_WAIT state forever.

To attempt to recover, I attached gdb and forcibly closed one of the stuck sockets' handle. This triggered a whole bunch of stack traces pointing to Arachni reactor's select_connections function (error: bad file descriptor). It didn't help though, and I had to kill Arachni at that point.

I think there's an issue somewhere in Arachni (or ruby?) where it doesn't handle sockets that get stuck in a CLOSE_WAIT state properly. Can you please investigate?

(Sorry, but I can't provide a reproduction environment; this was a client website.)

Assignee
Assign to
Time tracking