Skip to content

Instantly share code, notes, and snippets.

@dignan
dignan / README.md
Last active May 29, 2018 18:44
Segfault

To reproduce memcached segfault run

java -jar ReproduceMemcachedSegfault-1.0-SNAPSHOT-shaded.jar

@dignan
dignan / PSVM.java
Created May 23, 2018 22:53
Reproduce memcached segfault
import java.io.IOException;
import java.net.InetSocketAddress;
import java.util.Collections;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@dignan
dignan / main.rs
Created February 1, 2017 04:53
Mutex cannot find method with generics
use std::sync::Mutex;
trait TestTrait {
fn test() -> bool;
}
struct S<T: TestTrait> {
t: Mutex<T>,
}
@dignan
dignan / lib.rs
Last active January 21, 2017 21:51
extern crate futures;
extern crate futures_cpupool;
extern crate grpc;
extern crate protobuf;
extern crate tokio_timer;
pub mod client;
pub mod client_grpc;
use futures::Future;
@dignan
dignan / error.txt
Last active January 21, 2017 20:38
test_timer $ cargo build
Compiling test_timer v0.1.0 (file:///Users/dignan/projects/test_timer)
error[E0277]: the trait bound `grpc::error::GrpcError: std::convert::From<tokio_timer::TimeoutError<Box<futures::Future<Error=grpc::error::GrpcError, Item=test_timer::client::TestResponse> + Send>>>` is not satisfied
--> src/main.rs:24:25
|
24 | let timeout = timer.timeout(client.test(req), Duration::from_millis(5000)).wait();
| ^^^^^^^ the trait `std::convert::From<tokio_timer::TimeoutError<Box<futures::Future<Error=grpc::error::GrpcError, Item=test_timer::client::TestResponse> + Send>>>` is not implemented for `grpc::error::GrpcError`
|
= help: the following implementations were found:
= help: <grpc::error::GrpcError as std::convert::From<std::io::Error>>
2014-10-31 15:45:43
Full thread dump Java HotSpot(TM) 64-Bit Server VM (24.0-b56 mixed mode):
"IPC Client (1299496226) connection to <namenode1>/<namenode1 ip>:8020 from hbase" daemon prio=10 tid=0x00007f03a6c9f800 nid=0xf7c9 in Object.wait() [0x00007f033aae9000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at org.apache.hadoop.ipc.Client$Connection.waitForWork(Client.java:803)
- locked <0x000000061cc00000> (a org.apache.hadoop.ipc.Client$Connection)
at org.apache.hadoop.ipc.Client$Connection.run(Client.java:846)