incubator-clerezza-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reto Bachmann-Gmür (JIRA) <j...@apache.org>
Subject [jira] [Commented] (CLEREZZA-462) java.io.IOException: Bad file descriptor
Date Tue, 22 Mar 2011 20:06:05 GMT

    [ https://issues.apache.org/jira/browse/CLEREZZA-462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13009816#comment-13009816
] 

Reto Bachmann-Gmür commented on CLEREZZA-462:
---------------------------------------------

I think the solution to this one would be to have a low-startlevel service that is usually
never restarted and that provide virtual system inputstreams that can be terminated by a method
call. When such a stream is terminated any thread currently in ablocking read gets a -1, the
service however continues and does not interrupt its own call to read() of the real standard
input and will return the read char to the next read call of the next created virtual inputstream.
I've looked at felix.shell.tui but they don't seem to have a solution either, after stopping
the bundle the thread will terminate once the current line has been read.

> java.io.IOException: Bad file descriptor
> ----------------------------------------
>
>                 Key: CLEREZZA-462
>                 URL: https://issues.apache.org/jira/browse/CLEREZZA-462
>             Project: Clerezza
>          Issue Type: Bug
>            Reporter: Reto Bachmann-Gmür
>            Assignee: Reto Bachmann-Gmür
>
> Occasionally the following exception occurs when updating a bundle and the shell crashes.
The shell should resume gracefully.
> org.apache.clerezza.shell.InterruptibleInputStream$$anon$1@1578d4a: caught java.io.IOException:
Bad file descriptor
> java.io.IOException: Bad file descriptor
> 	at sun.nio.ch.FileDispatcher.read0(Native Method)
> 	at sun.nio.ch.FileDispatcher.read(FileDispatcher.java:26)
> 	at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:202)
> 	at sun.nio.ch.IOUtil.read(IOUtil.java:175)
> 	at sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:144)
> 	at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:48)
> 	at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:92)
> 	at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:86)
> 	at java.io.InputStream.read(InputStream.java:85)
> 	at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:64)
> 	at org.apache.clerezza.shell.InterruptibleInputStream$$anon$1$$anonfun$act$1$$anonfun$apply$1.apply(InterruptibleInputStream.scala:40)
> 	at org.apache.clerezza.shell.InterruptibleInputStream$$anon$1$$anonfun$act$1$$anonfun$apply$1.apply(InterruptibleInputStream.scala:35)
> 	at scala.actors.ReactorTask.run(ReactorTask.scala:34)
> 	at scala.actors.Reactor$class.resumeReceiver(Reactor.scala:129)
> 	at org.apache.clerezza.shell.InterruptibleInputStream$$anon$1.scala$actors$ReplyReactor$$super$resumeReceiver(InterruptibleInputStream.scala:32)
> 	at scala.actors.ReplyReactor$class.resumeReceiver(ReplyReactor.scala:69)
> 	at org.apache.clerezza.shell.InterruptibleInputStream$$anon$1.resumeReceiver(InterruptibleInputStream.scala:32)
> 	at scala.actors.Actor$class.searchMailbox(Actor.scala:478)
> 	at org.apache.clerezza.shell.InterruptibleInputStream$$anon$1.searchMailbox(InterruptibleInputStream.scala:32)
> 	at scala.actors.Reactor$$anonfun$startSearch$1$$anonfun$apply$mcV$sp$1.apply(Reactor.scala:114)
> 	at scala.actors.Reactor$$anonfun$startSearch$1$$anonfun$apply$mcV$sp$1.apply(Reactor.scala:114)
> 	at scala.actors.ReactorTask.run(ReactorTask.scala:36)
> 	at scala.concurrent.forkjoin.ForkJoinPool$AdaptedRunnable.exec(ForkJoinPool.java:611)
> 	at scala.concurrent.forkjoin.ForkJoinTask.quietlyExec(ForkJoinTask.java:422)
> 	at scala.concurrent.forkjoin.ForkJoinWorkerThread.mainLoop(ForkJoinWorkerThread.java:340)
> 	at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:325)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message