Bug 744726 - systemd-logind bug in error path if too many connections are opened
Summary: systemd-logind bug in error path if too many connections are opened
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 16
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL: http://lists.freedesktop.org/archives...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-10 10:27 UTC by Albert Strasheim
Modified: 2011-11-10 17:44 UTC (History)
9 users (show)

Fixed In Version: systemd-37-3.fc16
Clone Of:
Environment:
Last Closed: 2011-11-10 17:44:07 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
tool to reproduce problem (249.11 KB, application/octet-stream)
2011-10-10 10:27 UTC, Albert Strasheim
no flags Details

Description Albert Strasheim 2011-10-10 10:27:23 UTC
Created attachment 527202 [details]
tool to reproduce problem

Description of problem:

systemd-logind goes into an infinite loop in an error path if more than 1024 SSH connections are opened to the machine.

Version-Release number of selected component (if applicable):

systemd-36-4.fc16.x86_64

How reproducible:

Always

Steps to Reproduce:
1. sudo java -Xmx1024m -jar bork.jar hostname username password
  
Actual results:

After 1024 connections, system-logind goes into a loop, consumes a large amount of CPU and logging in to the system takes about a minute

Expected results:

systemd-logind shouldn't run into problems with 1024 connections.

Additional info:

Discussed here:

http://lists.freedesktop.org/archives/systemd-devel/2011-October/003560.html

Code for the bork program:

package bork;
import java.io.IOException;
import java.util.ArrayList;
import ch.ethz.ssh2.Connection;
public final class Bork {
public static void main(String[] args) throws IOException, InterruptedException {
if (args.length != 3) {
System.err.println("Usage: java -jar bork.jar hostname username password");
System.exit(1);
}
String hostname = args[0];
String user = args[1];
String password = args[2];
ArrayList<Connection> conns = new ArrayList<Connection>();
for (int i = 0; i < 2048; i++) {
Connection conn = new Connection(hostname);
conn.connect();
conn.authenticateWithPassword(user, password);
conns.add(conn);
}
}
}

Comment 1 Fedora Update System 2011-10-11 19:17:56 UTC
systemd-37-1.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/systemd-37-1.fc16

Comment 2 Fedora Update System 2011-10-13 18:10:06 UTC
Package systemd-37-1.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing systemd-37-1.fc16'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-14239
then log in and leave karma (feedback).

Comment 3 Fedora Update System 2011-10-20 02:22:07 UTC
Package systemd-37-2.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing systemd-37-2.fc16'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-14239
then log in and leave karma (feedback).

Comment 4 Fedora Admin XMLRPC Client 2011-10-20 16:31:37 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 5 Fedora Update System 2011-11-02 17:54:19 UTC
Package systemd-37-3.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing systemd-37-3.fc16'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-14239
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2011-11-10 17:44:07 UTC
systemd-37-3.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.