Skip to contentSkip to conversation

iproute2 regression -- ss -u returns an empty list

DISCUSSION Mihai Moldovan 2 participants 8 messages Apr 28, 2015 – Apr 29, 2015 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi,

Following up a bug report I received at
http://bugs.x2go.org/cgi-bin/bugreport.cgi?bug=799 it looks like the current version iproute2's ss utility always returns an empty result set whenever specifying the -u flag.

The problem has been bisected to 9db7bf15e22b6a1b8bc09c4a1e29571cbca55c94 and is also affecting version 3.19.0, but most notably 4.0.0+.

I'm not quite sure that's the correct commit, but it does definitely look related.

Even ss -xu, which previously returned a list of UNIX and UDP sockets now returns nothing on my systems.

Any help with that matter is greatly appreciated.

Mihai

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

On 28.04.2015 06:05 AM, Vadim Kochan wrote:> So by default ss prints socket with CONNECTED state and even UDP can be

Quoted 1 line

in the CONNECTED state on the Linux,

UDP can be in a CONNECTED state... ooookay. That's probably a conntrack thing.

Quoted 4 lines

so you can specify 'ss -ua' (may be
some explanation should be added to the ss man page) which should print UDP sockets in the any state, AFAIK it was the default behaviour before my changes.

Could this please be reverted? It's breaking other stuff that uses ss.

Also: ss -lxua returns an empty list, too. Previously, the families seem to have been OR'd, while they are now ANDed?

Mihai

#3 lore raw
Quoted 12 lines · Mihai Moldovan

On 28.04.2015 06:05 AM, Vadim Kochan wrote:> So by default ss prints socket with CONNECTED state and even UDP can be

Quoted 1 line

in the CONNECTED state on the Linux,

UDP can be in a CONNECTED state... ooookay. That's probably a conntrack thing.

Quoted 4 lines

so you can specify 'ss -ua' (may be
some explanation should be added to the ss man page) which should print UDP sockets in the any state, AFAIK it was the default behaviour before my changes.

Quoted 9 lines

Could this please be reverted? It's breaking other stuff that uses ss.

Also: ss -lxua returns an empty list, too. Previously, the families seem to have been OR'd, while they are now ANDed?

Mihai

I will try to fix this ...

#4 lore raw
Quoted 20 lines · Vadim Kochan
Quoted 19 lines · Mihai Moldovan

On 28.04.2015 06:05 AM, Vadim Kochan wrote:> So by default ss prints socket with CONNECTED state and even UDP can be

Quoted 1 line

in the CONNECTED state on the Linux,

UDP can be in a CONNECTED state... ooookay. That's probably a conntrack thing.

Quoted 3 lines

so you can specify 'ss -ua' (may be some explanation should be added to the ss man page) which should print UDP sockets in the any state, AFAIK it was the default behaviour before my changes.

Could this please be reverted? It's breaking other stuff that uses ss.

Also: ss -lxua returns an empty list, too. Previously, the families seem to have been OR'd, while they are now ANDed?

Quoted 4 lines
Quoted 2 lines

Mihai

I will try to fix this ...

Thanks!

To be a bit more verbose about the rationale:

Changing the default behavior is generally a bad idea, unless strictly necessary (e.g., if the previous default behavior was buggy anyway), because it may break other software. Please try introducing behavioral changes via new options.

That way, dependencies will still work fine and anyone who wants to use the new behavior can explicitly do so via a switch.

I could work around this by checking ss' version, but that turns out to be a pain, too, because ss -V reports something like this:

"ss utility, iproute2-ss150413"

Not exactly a "friendly" version like "3.19.0" or "4.0.0" to check against...

Mihai

#5 lore raw
Quoted 24 lines · Mihai Moldovan
Quoted 23 lines · Vadim Kochan
Quoted 21 lines · Mihai Moldovan

On 28.04.2015 06:05 AM, Vadim Kochan wrote:> So by default ss prints socket with CONNECTED state and even UDP can be

Quoted 1 line

in the CONNECTED state on the Linux,

UDP can be in a CONNECTED state... ooookay. That's probably a conntrack thing.

Quoted 3 lines

so you can specify 'ss -ua' (may be some explanation should be added to the ss man page) which should print UDP sockets in the any state, AFAIK it was the default behaviour before my changes.

Could this please be reverted? It's breaking other stuff that uses ss.

Also: ss -lxua returns an empty list, too. Previously, the families seem to have been OR'd, while they are now ANDed?

Mihai

Quoted 8 lines
Quoted 1 line

I will try to fix this ...

Thanks!

To be a bit more verbose about the rationale:

Changing the default behavior is generally a bad idea, unless strictly necessary (e.g., if the previous default behavior was buggy anyway), because it may break

Yes the previous behaviour was buggy ... And that was the reason.

Quoted 17 lines

other software. Please try introducing behavioral changes via new options.

That way, dependencies will still work fine and anyone who wants to use the new behavior can explicitly do so via a switch.

I could work around this by checking ss' version, but that turns out to be a pain, too, because ss -V reports something like this:

"ss utility, iproute2-ss150413"

Not exactly a "friendly" version like "3.19.0" or "4.0.0" to check against...

Mihai

#6 lore raw
In reply to Mihai Moldovan
Quoted 16 lines · Mihai Moldovan

Hi,

Following up a bug report I received at
http://bugs.x2go.org/cgi-bin/bugreport.cgi?bug=799 it looks like the current version iproute2's ss utility always returns an empty result set whenever specifying the -u flag.

The problem has been bisected to 9db7bf15e22b6a1b8bc09c4a1e29571cbca55c94 and is also affecting version 3.19.0, but most notably 4.0.0+.

I'm not quite sure that's the correct commit, but it does definitely look related.

Even ss -xu, which previously returned a list of UNIX and UDP sockets now returns nothing on my systems.

Quoted 6 lines

Any help with that matter is greatly appreciated.

Mihai

Hi Mihai,

Seems I have a fixed version, I tested it localy with different option combinations, and now there should be no issues when specifying different families.

Would you be able to test it ? How I can provide a fixed version to you - by patch or I can push to my github and give you a link ?

Thanks,

#7 lore raw

Hi Vadim,

Quoted 3 lines · Vadim Kochan

Seems I have a fixed version, I tested it localy with different option combinations, and now there should be no issues when specifying different families.

Thanks for the quick work! I'm happy to test.

Quoted 2 lines

Would you be able to test it ? How I can provide a fixed version to you - by patch or I can push to my github and give you a link ?

I don't mind, any way is fine. I can work either way.

Mihai

#8 lore raw
Quoted 11 lines · Mihai Moldovan

Hi Vadim,

Quoted 3 lines · Vadim Kochan

Seems I have a fixed version, I tested it localy with different option combinations, and now there should be no issues when specifying different families.

Thanks for the quick work! I'm happy to test.

Quoted 10 lines
Quoted 2 lines

Would you be able to test it ? How I can provide a fixed version to you - by patch or I can push to my github and give you a link ?

I don't mind, any way is fine. I can work either way.

Mihai

Hi Stephen,

I just saw that Linux 4.0.1 was released so I assume that you will prepare the v4.0.1 tag for iproute2 too, but would you please wait until this bug will be fixed ? I already have a working patch (from my point of view it works better than before), so I'd like to wait when Mihai will test the patch which I have sent directly to him.

Thanks,
Vadim