Public bug reported:

---
...
localhost> lua f = box.fiber.create(fun1)
---
...
localhost> lua box.fiber.resume(f)
---
Hello from fun1
 - true
...
localhost> lua box.fiber.status(f)
---
 - dead <!-- GOOD
...
localhost>
localhost> lua function fun2() print('Hello from fun2'); end
---
...
localhost> lua yet_another_fiber= box.fiber.create(fun2)
---
...
localhost>
localhost> lua box.fiber.status(yet_another_fiber)
---
 - suspended <!-- GOOD
...
localhost> lua box.fiber.status(f)
---
 - suspended  <!-- O RLY?
...
localhost> lua box.fiber.resume(f)
---
Hello from fun2  <!-- the f has been zombificated and then reused by second 
.create call
 - true
...

** Affects: tarantool
     Importance: Undecided
         Status: New

** Description changed:

  ---
  ...
  localhost> lua f = box.fiber.create(fun1)
  ---
  ...
  localhost> lua box.fiber.resume(f)
  ---
  Hello from fun1
-  - true
+  - true
  ...
  localhost> lua box.fiber.status(f)
  ---
-  - dead <!-- GOOD
+  - dead <!-- GOOD
  ...
- localhost> 
+ localhost>
  localhost> lua function fun2() print('Hello from fun2'); end
  ---
  ...
  localhost> lua yet_another_fiber= box.fiber.create(fun2)
  ---
  ...
- localhost> 
+ localhost>
  localhost> lua box.fiber.status(yet_another_fiber)
  ---
-  - suspended <!-- GOOD
+  - suspended <!-- GOOD
  ...
  localhost> lua box.fiber.status(f)
  ---
-  - suspended  <!-- O RLY?
+  - suspended  <!-- O RLY?
  ...
  localhost> lua box.fiber.resume(f)
  ---
- Hello from fun2  <!-- the f has been zombificated and when reused by second 
.create call
-  - true
+ Hello from fun2  <!-- the f has been zombificated and then reused by second 
.create call
+  - true
  ...

-- 
You received this bug notification because you are a member of Tarantool
Development Team, which is subscribed to tarantool.
https://bugs.launchpad.net/bugs/1099552

Title:
  box.fiber does not detect reused fibers

Status in Tarantool - an efficient in-memory data store:
  New

Bug description:
  ---
  ...
  localhost> lua f = box.fiber.create(fun1)
  ---
  ...
  localhost> lua box.fiber.resume(f)
  ---
  Hello from fun1
   - true
  ...
  localhost> lua box.fiber.status(f)
  ---
   - dead <!-- GOOD
  ...
  localhost>
  localhost> lua function fun2() print('Hello from fun2'); end
  ---
  ...
  localhost> lua yet_another_fiber= box.fiber.create(fun2)
  ---
  ...
  localhost>
  localhost> lua box.fiber.status(yet_another_fiber)
  ---
   - suspended <!-- GOOD
  ...
  localhost> lua box.fiber.status(f)
  ---
   - suspended  <!-- O RLY?
  ...
  localhost> lua box.fiber.resume(f)
  ---
  Hello from fun2  <!-- the f has been zombificated and then reused by second 
.create call
   - true
  ...

To manage notifications about this bug go to:
https://bugs.launchpad.net/tarantool/+bug/1099552/+subscriptions

_______________________________________________
Mailing list: https://launchpad.net/~tarantool-developers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~tarantool-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to