Detecting deadlocked file transfer protocol upload connections and performing session self-recovery using information stored in a FIFO resource array
First Claim
1. A method for File Transfer Protocol (FTP) deadlock detection and self-recovery in a network element, comprising:
- determining, by a daemon configured in the network element, whether a deadlock occurs in an FTP upload task by periodically transmitting a heartbeat detection message to an FTP upload task unit configured in the network element to perform the FTP upload task;
upon determining that the deadlock occurs in the FTP upload task, recording socket resources used by the deadlocked FTP upload task in a socket resource cycle queue in the network element;
starting a process of ending the deadlocked FTP upload task;
assigning a new access location in the socket resource cycle queue; and
initializing the deadlocked FTP upload task again using the new access location,wherein recording socket resources comprises of determining whether the socket resource cycle queue is full, upon determining that the socket resource cycle queue is not full, storing socket resources used by the deadlocked FTP upload task into the socket resource cycle queue, and upon determining that the socket resource cycle queue is full, releasing earliest socket resources from the socket resource cycle queue, and storing the socket resources used by the deadlocked FTP upload task into the socket resource cycle queue,wherein the socket resource cycle queue is implemented as a first-in-first-out (FIFO) array, and the socket resources used by the deadlocked FTP upload task are inserted into a head of the socket resource cycle queue, andwherein socket resources initially inserted in the head of the socket resource cycle queue are later released when cycling to a tail of the socket resource cycle queue, according to an FIFO principle.
1 Assignment
0 Petitions
Accused Products
Abstract
A method and a device for file transfer protocol (FTP) deadlock detection and self recovery are provided by the disclosure in order to solve the sudden deadlock problem in the FTP upload task. The method includes: if a daemon determines that a deadlock occurs in an FTP upload task by a heartbeat detection mechanism, the socket resources used by the FTP upload task is recorded at the storage location in a socket resource cycle queue, and a process of ending the FTP upload task is started; determining whether the socket resource cycle queue is full, if it is not full, the socket resources used by the FTP upload task in the current deadlock is put into the socket resource cycle queue, otherwise, the earliest socket resources in the socket resource cycle queue are released, and the socket resources used by the FTP upload task in the current deadlock is put into the socket resource cycle queue.
38 Citations
9 Claims
-
1. A method for File Transfer Protocol (FTP) deadlock detection and self-recovery in a network element, comprising:
-
determining, by a daemon configured in the network element, whether a deadlock occurs in an FTP upload task by periodically transmitting a heartbeat detection message to an FTP upload task unit configured in the network element to perform the FTP upload task; upon determining that the deadlock occurs in the FTP upload task, recording socket resources used by the deadlocked FTP upload task in a socket resource cycle queue in the network element; starting a process of ending the deadlocked FTP upload task; assigning a new access location in the socket resource cycle queue; and initializing the deadlocked FTP upload task again using the new access location, wherein recording socket resources comprises of determining whether the socket resource cycle queue is full, upon determining that the socket resource cycle queue is not full, storing socket resources used by the deadlocked FTP upload task into the socket resource cycle queue, and upon determining that the socket resource cycle queue is full, releasing earliest socket resources from the socket resource cycle queue, and storing the socket resources used by the deadlocked FTP upload task into the socket resource cycle queue, wherein the socket resource cycle queue is implemented as a first-in-first-out (FIFO) array, and the socket resources used by the deadlocked FTP upload task are inserted into a head of the socket resource cycle queue, and wherein socket resources initially inserted in the head of the socket resource cycle queue are later released when cycling to a tail of the socket resource cycle queue, according to an FIFO principle. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A device for File Transfer Protocol (FTP) deadlock detection and self-recovery in a network element, comprising:
-
a memory storing programming instructions; and a processor configured to execute the stored programming instructions to perform a method comprising; determining, by a daemon configured in the network element, whether a deadlock occurs in an FTP upload task by periodically transmitting a heartbeat detection message to an FTP upload task unit configured in the network element to perform the FTP upload task; upon determining that the deadlock occurs in the FTP upload task, recording socket resources used by the deadlocked FTP upload task in a socket resource cycle queue in the network element; starting a process of ending the deadlocked FTP upload task; assigning a new access location in the socket resource cycle queue; and initializing the deadlocked FTP upload task again using the new access location, wherein recording socket resources comprises of determining whether the socket resource cycle queue is full, upon determining that the socket resource cycle queue is not full, storing socket resources used by the deadlocked FTP upload task into the socket resource cycle queue, and upon determining that the socket resource cycle queue is full, releasing earliest socket resources from the socket resource cycle queue, and storing the socket resources used by the deadlocked FTP upload task into the socket resource cycle queue, wherein the socket resource cycle queue is implemented as a first-in-first-out (FIFO) array, and the socket resources used by the deadlocked FTP upload task are inserted into a head of the socket resource cycle queue, and wherein socket resources initially inserted in the head of the socket resource cycle queue are later released when cycling to a tail of the socket resource cycle queue, according to an FIFO principle. - View Dependent Claims (7, 8, 9)
-
Specification