Coder Social home page Coder Social logo

Comments (6)

kallisti5 avatar kallisti5 commented on May 29, 2024

Here's an strace from the hang:

[pid 11679] sched_getaffinity(0, 128, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) = 8
[pid 11679] clone(child_stack=0x7f844101ccf0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTIDstrace: Process 11688 attached
, parent_tid=[11688], tls=0x7f844101d700, child_tidptr=0x7f844101d9d0) = 11688
[pid 11688] set_robust_list(0x7f844101d9e0, 24 <unfinished ...>
[pid 11679] close(55 <unfinished ...>
[pid 11688] <... set_robust_list resumed>) = 0
[pid 11679] <... close resumed>)        = 0
[pid 11688] sigaltstack(NULL,  <unfinished ...>
[pid 11679] close(56 <unfinished ...>
[pid 11688] <... sigaltstack resumed>{ss_sp=NULL, ss_flags=SS_DISABLE, ss_size=0}) = 0
[pid 11679] <... close resumed>)        = 0
[pid 11688] mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0 <unfinished ...>
[pid 11679] close(57 <unfinished ...>
[pid 11688] <... mmap resumed>)         = 0x7f844194b000
[pid 11679] <... close resumed>)        = 0
[pid 11688] sigaltstack({ss_sp=0x7f844194b000, ss_flags=0, ss_size=8192},  <unfinished ...>
[pid 11679] futex(0x55d24888c218, FUTEX_WAIT_PRIVATE, 0, NULL <unfinished ...>
[pid 11688] <... sigaltstack resumed>NULL) = 0
[pid 11688] prctl(PR_SET_NAME, "tokio-runtime-w"...) = 0
[pid 11688] sched_getaffinity(11688, 32, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) = 8
[pid 11688] getrandom("\x25\x20\x72\xcd\x8a\xa0\xf7\xe7\x0a\x5b\xf9\x25\x13\x84\x9c\xf0", 16, GRND_NONBLOCK) = 16
[pid 11688] sched_yield()               = 0
[pid 11688] sched_yield()               = 0
[pid 11688] sched_yield()               = 0
[pid 11688] epoll_wait(52, [], 1024, 0) = 0
[pid 11688] epoll_ctl(52, EPOLL_CTL_ADD, 3, {EPOLLIN|EPOLLPRI|EPOLLOUT|EPOLLET, {u32=0, u64=0}}) = 0
[pid 11688] epoll_wait(52, [], 1024, 0) = 0
[pid 11688] sched_yield()               = 0
[pid 11688] sched_yield()               = 0
[pid 11688] sched_yield()               = 0
[pid 11688] epoll_wait(52, [], 1024, 0) = 0
[pid 11688] epoll_wait(52, 

And this app's dependencies:

[dependencies]
url = "*"
futures = "*"
hyper = "0.12"
regex = "*"
rust-s3 = {version = "0.18.0", features = ["no-verify-ssl"]}
toml = "0.4"
serde = "*"
serde_derive = "*"

from rust-s3.

kallisti5 avatar kallisti5 commented on May 29, 2024

I downgraded to 0.15.0, and it appears to be working:

./test 
RouteCache/Sync: TTL expired, refreshing bucket inventory...
BUCKET LIST
ListBucketResult { name: "my-fancy-bucket", next_marker: None, delimiter: Some("/"), max_keys: 1000, prefix: "/", marker: None, encoding_type: None, is_truncated: false, next_continuation_token: None, contents: [], common_prefixes: None }, 200
BUCKET LISTED
diff --git a/src/routecache/mod.rs b/src/routecache/mod.rs
index f7529ee..3be501d 100644
--- a/src/routecache/mod.rs
+++ b/src/routecache/mod.rs
@@ -114,10 +114,12 @@ impl RouteCache {
         let bucket = Bucket::new(&config.s3_bucket.unwrap(), region, credentials)?;
 
         //let mut architectures: Vec<Architecture> = Vec::new();
-        let results = bucket.list_all(config.s3_prefix.unwrap(), Some("/".to_string()))?;
+        println!("BUCKET LIST");
+        let results = bucket.list(&config.s3_prefix.unwrap(), Some("/"))?;
         for (list, code) in results {
-            println!("{:?}", list);
+            println!("{:?}, {:?}", list, code);
         }
+        println!("BUCKET LISTED");
 
         self.last_update = Some(Instant::now());
         return Ok(0);

from rust-s3.

kallisti5 avatar kallisti5 commented on May 29, 2024

On 0.18.0:

$ ./test 
RouteCache/Sync: TTL expired, refreshing bucket inventory...
BUCKET LIST
(hang)

from rust-s3.

durch avatar durch commented on May 29, 2024

@kallisti5 thanks for the report I'll look right into that, as its broken in 0.18 I suspect it has something to do with paging, namely 0.15 version just returns the first page of the list, which is likely enough for most buckets.

I'll be looking into this, in the meantime I'll push a version that will make list_page function public, which should be identical to the list function in 0.15. Will keep you posted.

from rust-s3.

durch avatar durch commented on May 29, 2024

version 0.18.2-beta is live, it exposes the list_page Bucket method.

from rust-s3.

durch avatar durch commented on May 29, 2024

@kallisti5 version 0.18.3 has been published to crates.io, it provides a fix for the issue you've encountered. Once again, thank you for reporting it!

from rust-s3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.