mikkeli 2bba647a7b fix(jni): close the output pipe before joining the reader thread
Every test hung on the thread that started it. iperf_cleanup_and_signal()
called pthread_join() on the reader thread before closing the pipe's write
end, but the reader blocks in fgets() until EOF and EOF only arrives once
that write end is closed — two lines further down, after the join. Neither
side could ever make progress.

The reader also freed the shared state struct on exit while the caller went
on to read state->outfile and state->callback_ref and free it a second time,
so any path that got past the join corrupted the heap. Ownership now sits
solely with the JNI caller, which frees the struct after the join.

On the longjmp path outfile was fclose'd twice, once inline and once inside
the cleanup helper, so close_outfile() is idempotent and the hand-rolled
unwinding is gone. Signal handlers are restored to SIG_DFL once a test ends,
because leaving them armed pointed a later SIGTERM at a jmp_buf whose stack
frame no longer existed.

g_test is now guarded by a mutex and a second concurrent run is refused: a
stop request arrives on the platform thread while the test runs elsewhere,
which would otherwise race the worker retiring the pointer. Startup failures
report through onError/onComplete instead of returning silently, so Dart
resolves its completer rather than waiting out a timeout.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-26 19:03:22 +09:00

iperf3-gui

A Flutter-based Android GUI wrapper for iperf3, the popular network performance measurement tool.

Features

  • Client-mode network throughput testing
  • Simple UI: enter server address, port, and press GO
  • Raw iperf3 output display
  • Bundled iperf3 v3.21 binaries for arm64-v8a and armeabi-v7a

Architecture

lib/
├── domain/
│   ├── models/          # TestConfiguration, Iperf3Result
│   └── services/        # Iperf3Service (Process runner)
├── ui/
│   └── features/
│       └── test_run/    # TestRunScreen, TestRunViewModel
├── main.dart            # App entry point
└── pubspec.yaml         # Dependencies: provider, path_provider

Building

Prerequisites:

  • Flutter 3.47+
  • Android SDK with platform android-36
  • JDK 17
flutter create . --org novoyuuparosk --project-name iperf3gui
flutter pub get
flutter analyze
flutter build apk --debug

iperf3 Binaries

Pre-compiled binaries are sourced from davidBar-On/android-iperf3 and bundled in assets/iperf3/ (arm64-v8a and armeabi-v7a for Android 28+).

License

MIT — bundled iperf3 v3.21 is BSD-3-Clause licensed.

S
Description
No description provided
Readme MIT 2 MiB
2026-08-26 13:44:11 +00:00
Languages
C 70.4%
Makefile 11.5%
Dart 7.8%
C++ 2.6%
Roff 2.5%
Other 5.2%