[Bug 99] New: logback 0.9.8 keeps dropping and recreating connections

http://bugzilla.qos.ch/show_bug.cgi?id=99 Summary: logback 0.9.8 keeps dropping and recreating connections Product: logback-general Version: unspecified Platform: All OS/Version: All Status: NEW Severity: blocker Priority: P1 Component: build-structure AssignedTo: logback-dev@qos.ch ReportedBy: joern@huxhorn.de I have a serious problem with logback 0.9.8 that forced me to downgrade to 0.9.7 again. The socket-appender keeps dropping and recreating connections, missing log-events in the process. It does so at least once, i.e. creating a connection without writing a single event and then closing it again immeditaly. I tried to reporduce the behaviour in a simple test program but didn't succeed. Everything is fine in a simple test. In both of our "real" applications, however, this problem is definitly reproducible and just vanishes after a downgrade to 0.9.7. I suspect that the problem is connected to log4j-over-slf4j because that's one of the differences to my small test. We have the following dependencies: <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <scope>compile</scope> </dependency> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <scope>provided</scope> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>jcl104-over-slf4j</artifactId> <scope>runtime</scope> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>log4j-over-slf4j</artifactId> <scope>runtime</scope> </dependency> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <scope>provided</scope> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-core</artifactId> <scope>compile</scope> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <scope>compile</scope> </dependency> with slf4j 1.4.3 and logback 0.9.8 as version. We use several third-party jars in our apps, e.g. spring, commons-stuff etc., so we have to map both commons-logging as well as log4j to logback. This worked perfectly up to version 0.9.7 but doesn't work anymore! I'm sorry about this rather obscure error report but I'm really quite clueless about the problem myself. I just checked the svn repos and the last socket appender change was done 4 month ago so that can't be responsible... I'll try to investigate this some more but you might already know what's wrong since you know what changed between 0.9.7 and 0.9.8. The problem exists on at least Windows and Solaris, btw. -- Configure bugmail: http://bugzilla.qos.ch/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.

http://bugzilla.qos.ch/show_bug.cgi?id=99 noreply.ceki@qos.ch changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED ------- Comment #1 from noreply.ceki@qos.ch 2007-09-25 21:41 ------- Hello Joern, Thank you for this bug report. Unless I am mistaken, the code in SocketAppender and SocketServer classes have not changed between logback 0.9.7 and 0.9.8. However, the LoggingEvent class changed a little between those two versions which could explain erratic behavior *assuming* the client and server side were using different logback versions. Is that a possibility? -- Configure bugmail: http://bugzilla.qos.ch/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.

http://bugzilla.qos.ch/show_bug.cgi?id=99 ------- Comment #2 from joern@huxhorn.de 2007-09-26 12:30 ------- Hi Ceki. I'm really confused myself because I already compared 0.9.7 vs 0.9.8 and couldn't find any changes that look critical. My only guess (and it's just that - a guess) is that there may be a problem in LogbackMDCAdapter or StaticMDCBinder because those files are actually new. There's also a change in LoggingEvent concerning MDC so this could really (somehow) be the reason. The whole problem does not manifest if I'm only using logback for logging (like in my test-application for my viewer) without any third-party jars that use log4j and/or commons-logging so it's probably a problem connected to static logger instances in those third-party jars. The Log-Event-Receiver is my own application which you can download at http://lumberjack.huxhorn.de/lumberjack0914.zip (it's not yet released "in the wild" but I welcome any comments). My viewer is using 0.9.8 in both cases, i.e. it's working with 0.9.7 in the application sending the logging events and does not work (drops and recreates connections while losing events) with 0.9.8. I double and triple-checked this... it's *really* reproducible by just changing the logback-dependencies from 0.9.7 to 0.9.8 in the application that's sending the log-events. The problem manifests in both our web-application and our console application so I can at least say that it's not a web-container-related problem. Both apps use spring-framework during startup which in turn uses commons-logging. We are also depending on spring-modules-cache-0.7 which depends on log4j. I'm sorry about this rather obscure problem and will try to isolate it further... -- Configure bugmail: http://bugzilla.qos.ch/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
participants (1)
-
bugzilla-daemon@pixie.qos.ch