A server cannot ping to other servers unless a wireshark is capturing packet. And I believe that a process is capturing packets before ping process. But how to find this process?
OK. I solve this problem myself. The truth is that the packet send to my server has a correct IP address but a wrong MAC address. So in case the wiredshark is turned off, the network interface card(NIC) will drop it directly. But if the wiredshark is turned on, it will capture the packet and modified the MAC address to a correct one.
I am experiencing the same problem while pinging my Ethernet target device from a Windows 7 machine (Enterprise, SP1). In my configuration there are 2 USB2Ethernet adapters and the Ethernet interface in Windows comes from the adapter's driver. This hardware configuration works for sure (it does when pinging from Linux). But not from Windows.
Unfortunately, your answer does not clarify the root of the problem. If you mean that ICMP response has a wrong MAC addr., the question is why it is actually wrong. If you are using off-the-shelf software (standard tools shipped with your OS) and no hand-made ICMP requests/responses, the question is still open, what is the root of the wrong MAC addr. problem? The TCP/IP stack (with ICMP implementation being part of it) works AFAIU first discovering the MAC addr. via ARP broadcast request and then selects the destination MAC addr. based on the given response[s].
Anyway, I have tried setting static ARP entry for the destination IP (tried both the USB2Ethernet's MAC addr. connected to the Windows peer and the MAC addr. of the target Ethernet interface). No luck so far.
At the target system (the one being pinged) I can see, that ICMP responses are actually sent, but Windows system seems to be filtering them out.
With Wireshark listening to the port the problem is fixed, and networking with the target system works perfectly (ICMP and all other protocols).
I suppose it has something to do with the promiscuous mode the Wireshark brings the Ethernet interface into while sniffing and/or some Windows settings/services I am not aware of.