A method for locating a root cause of a network anomaly in a communications network, the communications network has a multi-stage Clos architecture, wherein multiple network devices are arranged in one or more aggregation layers and an access layer, wherein the communications network further comprises a network management device, wherein the method is performed by an individual network device in the access layer, or an individual network device in any one of the aggregation layers provided that the aggregation layer is a lower layer connected to at least one higher aggregation layer in the one or more aggregation layers, the method comprising: when a priority flow control, PFC, deadlock occurs in a first egress port queue in the network device, determining an abnormal data flow in the first egress port queue, wherein both an egress port and an ingress port of the abnormal data flow are upstream ports of the network device, and the first egress port queue is any egress port queue in the network device; and sending anomaly information to the network management device, wherein the anomaly information comprises an identifier of the abnormal data flow; wherein the determining an abnormal data flow in the first egress port queue comprises generating an access control list when the PFC deadlock occurs in the first egress port queue; and determining, based on the access control list, the abnormal data flow from data flows that are sent to the first egress port queue; wherein the access control list is an instruction list of a network device interface, wherein an entry in the access control list includes two parts: a filter and an action such that when the network device matches content defined in the filter, an action defined in the action is performed; wherein the method further comprises: when a quantity of packets sent by the first egress port queue in a preset time period is 0 and the first egress port queue receives a PFC frame in the preset time period, determining that the PFC deadlock occurs in the first egress port queue. when a priority flow control, PFC, deadlock occurs in a first egress port queue in the network device, determining an abnormal data flow in the first egress port queue, wherein both an egress port and an ingress port of the abnormal data flow are upstream ports of the network device, and the first egress port queue is any egress port queue in the network device; and sending anomaly information to the network management device, wherein the anomaly information comprises an identifier of the abnormal data flow; wherein the determining an abnormal data flow in the first egress port queue comprises generating an access control list when the PFC deadlock occurs in the first egress port queue; and determining, based on the access control list, the abnormal data flow from data flows that are sent to the first egress port queue; wherein the access control list is an instruction list of a network device interface, wherein an entry in the access control list includes two parts: a filter and an action such that when the network device matches content defined in the filter, an action defined in the action is performed; wherein the method further comprises: when a quantity of packets sent by the first egress port queue in a preset time period is 0 and the first egress port queue receives a PFC frame in the preset time period, determining that the PFC deadlock occurs in the first egress port queue.