<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Rin Katsuragi</title>
    <description>The latest articles on DEV Community by Rin Katsuragi (@rinrinrinrin).</description>
    <link>https://dev.to/rinrinrinrin</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4175044%2Fc86468be-4a7f-4fd1-ac23-2ec2060d5291.png</url>
      <title>DEV Community: Rin Katsuragi</title>
      <link>https://dev.to/rinrinrinrin</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rinrinrinrin"/>
    <language>en</language>
    <item>
      <title>Hunting Down a Zombie Python Thread: My First PR to Webots 🤖🌸</title>
      <dc:creator>Rin Katsuragi</dc:creator>
      <pubDate>Sat, 10 Oct 2026 14:15:10 +0000</pubDate>
      <link>https://dev.to/rinrinrinrin/hunting-down-a-zombie-python-thread-my-first-pr-to-webots-2ijp</link>
      <guid>https://dev.to/rinrinrinrin/hunting-down-a-zombie-python-thread-my-first-pr-to-webots-2ijp</guid>
      <description>&lt;blockquote&gt;
&lt;h2&gt;
  
  
  How a subtle threading deadlock on Windows led to my first open source contribution to the Webots robotics simulator.
&lt;/h2&gt;
&lt;/blockquote&gt;

&lt;p&gt;Following up on my intro post from quiet Ikoma, and while hype still runs through me, I wanted to share a fun little milestone as I just submitted my first Pull Request to Webots!&lt;/p&gt;

&lt;p&gt;If you work in robotics or embodied AI, you probably know Webots, it’s an incredible open-source 3D robot simulator used worldwide for prototyping everything from multi-jointed arms to autonomous rovers before touching physical hardware.&lt;/p&gt;

&lt;p&gt;Here is the story of a sneaky deadlock on Windows, and how I solved it.&lt;/p&gt;




&lt;h3&gt;
  
  
  The Mystery of the Zombie Process 🧟‍♂️
&lt;/h3&gt;

&lt;p&gt;While working with external Python controllers on Windows, I ran into an issue where scripts wouldn't terminate. &lt;/p&gt;

&lt;p&gt;When running a controller with stdout/stderr redirection enabled (&lt;code&gt;--stdout-redirect&lt;/code&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;controller&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Robot&lt;/span&gt;

&lt;span class="n"&gt;robot&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Robot&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hello Webots!&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# simulation loop finishes...
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The simulation ended, the message printed cleanly to the Webots console, but &lt;code&gt;python.exe&lt;/code&gt; never exited but stayed stuck in the background as a zombie process until forcefully killed. I also noticed there is an open issue that specified the exact error from the maintainer.&lt;/p&gt;

&lt;p&gt;Why did that happen?&lt;/p&gt;




&lt;h3&gt;
  
  
  The Anatomy of the Deadlock 🔍
&lt;/h3&gt;

&lt;p&gt;Digging into Webots' Python API (&lt;code&gt;robot.py&lt;/code&gt;), stdout redirection is handled by a class called &lt;code&gt;StdStreamRedirect&lt;/code&gt;. It sets up an OS pipe (&lt;code&gt;os.pipe()&lt;/code&gt;) and a background helper thread that reads lines from the pipe and forwards them directly to the Universal C Runtime (&lt;code&gt;ucrtbase&lt;/code&gt;), allowing Webots' C++ backend to capture the output.&lt;/p&gt;

&lt;p&gt;Here was the catch:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Python shutdown order&lt;/strong&gt;: When a Python script reaches EOF, Python's runtime (&lt;code&gt;threading._shutdown&lt;/code&gt;) waits to join all non-daemon threads before executing &lt;code&gt;atexit&lt;/code&gt; cleanup callbacks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The pipe blocking&lt;/strong&gt;: The helper thread was created with &lt;code&gt;daemon=False&lt;/code&gt;. It was blocked inside &lt;code&gt;self._r.readline()&lt;/code&gt;, waiting for an EOF on the pipe.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The stalemate&lt;/strong&gt;: An OS pipe only sends EOF when all write ends are closed. But the write end was scheduled to close inside an &lt;code&gt;atexit&lt;/code&gt; callback!&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The interpreter waited for the thread to finish before running &lt;code&gt;atexit&lt;/code&gt;, but the thread couldn't finish until &lt;code&gt;atexit&lt;/code&gt; ran resulting to classic deadlock.&lt;/p&gt;




&lt;h3&gt;
  
  
  The Solution 🛠️
&lt;/h3&gt;

&lt;p&gt;The fix was clean and minimal:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Daemonize the helper thread (&lt;code&gt;daemon=True&lt;/code&gt;)&lt;/strong&gt;: This allows Python to exit the main thread and proceed smoothly into the &lt;code&gt;atexit&lt;/code&gt; stage.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Explicit &lt;code&gt;close()&lt;/code&gt; in &lt;code&gt;atexit&lt;/code&gt;&lt;/strong&gt;: We close the write pipe (sending EOF down the pipe), then call &lt;code&gt;self._thread.join()&lt;/code&gt; to guarantee all pending prints are flushed to Webots before final termination.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Restore streams&lt;/strong&gt;: Restored &lt;code&gt;sys.stdout&lt;/code&gt; and &lt;code&gt;sys.stderr&lt;/code&gt; before closing to ensure any late interpreter shutdown messages don't raise &lt;code&gt;ValueError: I/O operation on closed file&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Tested on Windows 11 — zero hangs, instant exit with code &lt;code&gt;0&lt;/code&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  Small Steps Forward 🌱
&lt;/h3&gt;

&lt;p&gt;Contributing to the core tools you rely on daily in your research is such a rewarding feeling. &lt;/p&gt;

&lt;p&gt;If you've been hesitating to contribute to a large open-source project, start by tackling a small bug or reading through issue trackers. You might find a curious little puzzle waiting for you as I did!&lt;/p&gt;

&lt;p&gt;What was your first open-source bug fix like? I'd love to hear your stories and get inspired to be not afraid to post about my journey in robotics and AI, even if my contributions look small and simple to advanced devs! 🍵💅&lt;/p&gt;

</description>
      <category>robotics</category>
      <category>python</category>
      <category>opensource</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Hi! 👋 From Ikoma to the DEV Community: Why I’m Building AI that Touches the Real World</title>
      <dc:creator>Rin Katsuragi</dc:creator>
      <pubDate>Sat, 10 Oct 2026 11:35:12 +0000</pubDate>
      <link>https://dev.to/rinrinrinrin/hi-from-ikoma-to-the-dev-community-why-im-building-ai-that-touches-the-real-world-45hl</link>
      <guid>https://dev.to/rinrinrinrin/hi-from-ikoma-to-the-dev-community-why-im-building-ai-that-touches-the-real-world-45hl</guid>
      <description>&lt;p&gt;Konnichiwa, DEV Community! 🌸&lt;/p&gt;

&lt;p&gt;I am Rin from Japan, and this is my first post in dev.to! I’ve been a long-time lurker, reading amazing tutorials and system architecture breakdowns, but today I’m finally stepping out of the shadows to say hello and share a bit of my world.&lt;/p&gt;

&lt;p&gt;I am a Japanese-Russian student, living in Ikoma, a beautiful city in Nara, surrounded by lush green hills. By day (and many late nights) I am a graduate focusing on AI/ML, specifically diving deep into Human-Machine Interaction (HMI) and Robotics.&lt;/p&gt;




&lt;h3&gt;
  
  
  🧠 My Focus
&lt;/h3&gt;

&lt;p&gt;I think when a lot of people think about AI they think about abstract LLM wrappers, chatbots or purely digital software, but for me the magic happens when the digital world collides with physical reality. &lt;/p&gt;

&lt;p&gt;In my research, I am very interested in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Human-Machine Interaction (HMI):&lt;/strong&gt; How can we design multimodal systems (combining speech, vision, and touch) so that AI feels like a natural partner to a human rather than an unyielding tool?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Physical AI &amp;amp; Robot Learning:&lt;/strong&gt; Implementing reinforcement learning algorithms onto physical machinery. Trust me, it’s one thing to see an agent succeed in a clean, simulated environment, and a completely different ballgame when you deploy it onto a robot arm that has to deal with friction, weird lighting, and real-world unpredictability!&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  🌱 What Drives Me
&lt;/h3&gt;

&lt;p&gt;I was born and raised in Russia to Japanese and Russian parents, and my family moved to Japan in the late 90s. Living and studying in Japan, you see the demographic shifts happening in real time, as we have an aging population, and there are very real, immediate labor shortages in sectors like healthcare, agriculture, and manufacturing. &lt;/p&gt;

&lt;p&gt;For me, AI isn’t just a cool math problem or a way to optimize ad clicks, or a fancy startup idea catalyst, but necessity. &lt;/p&gt;

&lt;p&gt;My ultimate drive is as cliche as it may sound, real-life impact. I want to build intelligent systems that can:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Assist physical therapists in rehabilitation clinics.&lt;/li&gt;
&lt;li&gt;Collaborate safely alongside factory workers without requiring rigid safety cages.&lt;/li&gt;
&lt;li&gt;Help create intuitive assistive technologies for the elderly.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Seeing an algorithm you wrote actually move a mechanical joint or help a human complete a exhausting task more safely, that is the most rewarding feeling in the world. &amp;lt;3&lt;/p&gt;




&lt;h3&gt;
  
  
  🚀 Why I’m on DEV
&lt;/h3&gt;

&lt;p&gt;I’m joining DEV because I want to document my journey, share the messy realities of training robotics models (spoiler alert: things fall over. A lot.), and connect with developers worldwide. &lt;/p&gt;

&lt;p&gt;In my upcoming posts, I plan to write about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The math behind deep reinforcement learning in physical spaces.&lt;/li&gt;
&lt;li&gt;My setups, failures, and breakthrough moments in the lab.&lt;/li&gt;
&lt;li&gt;What it's like researching AI nestled here in the quiet tech hub of Ikoma.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thank you so much for reading my mini-intro, or at least I hope it's mini :D I'd love to connect with anyone working in computer vision, robotics, or just general machine learning. &lt;/p&gt;

&lt;p&gt;Let's do our best to make the world a better place, for humans first! 💪&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>ai</category>
      <category>machinelearning</category>
      <category>robotics</category>
    </item>
  </channel>
</rss>
