{"action":"created","issue":{"url":"https://api.github.com/repos/AltraMayor/f3/issues/7","labels_url":"https://api.github.com/repos/AltraMayor/f3/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/AltraMayor/f3/issues/7/comments","events_url":"https://api.github.com/repos/AltraMayor/f3/issues/7/events","html_url":"https://github.com/AltraMayor/f3/issues/7","id":52879642,"number":7,"title":"f3fix expected duration & explanation","user":{"login":"qubodup","id":18312,"avatar_url":"https://avatars.githubusercontent.com/u/18312?v=3","gravatar_id":"","url":"https://api.github.com/users/qubodup","html_url":"https://github.com/qubodup","followers_url":"https://api.github.com/users/qubodup/followers","following_url":"https://api.github.com/users/qubodup/following{/other_user}","gists_url":"https://api.github.com/users/qubodup/gists{/gist_id}","starred_url":"https://api.github.com/users/qubodup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qubodup/subscriptions","organizations_url":"https://api.github.com/users/qubodup/orgs","repos_url":"https://api.github.com/users/qubodup/repos","events_url":"https://api.github.com/users/qubodup/events{/privacy}","received_events_url":"https://api.github.com/users/qubodup/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2014-12-26T03:34:45Z","updated_at":"2015-01-01T17:41:59Z","closed_at":null,"body":"1. At http://oss.digirati.com.br/f3/ , f3probe has an explanation, while f3fix does not.\r\n\r\n2. After 5 minutes, f3fix has not finished.\r\nIf this is not to be expected, perhaps somebody could tell me how to debug?\r\n\r\nMy fake microSD card details:\r\n<pre>\t     *Real* size: 7.50 GB (1966310 blocks)\r\n\t  Announced size: 62.50 GB (16384000 blocks)\r\n\t          Module: 64.00 GB (2^36 Bytes)\r\n\t      Block size: 4.00 KB (2^12 Bytes)\r\n\tLast good sector: 15730479\r\n\r\nProbe time: 97.77 seconds\r\nProbe read op: count=109, total time=0.37s, avg op time=3.40ms\r\nProbe write op: count=62, total time=30.92s, avg op time=498.75ms\r\nProbe reset op: count=10, total time=66.47s, avg op time=6647.26ms\r\nsudo f3fix --last-sec=15730479 /dev/sdb</pre>"},"comment":{"url":"https://api.github.com/repos/AltraMayor/f3/issues/comments/68492722","html_url":"https://github.com/AltraMayor/f3/issues/7#issuecomment-68492722","issue_url":"https://api.github.com/repos/AltraMayor/f3/issues/7","id":68492722,"user":{"login":"AltraMayor","id":727014,"avatar_url":"https://avatars.githubusercontent.com/u/727014?v=3","gravatar_id":"","url":"https://api.github.com/users/AltraMayor","html_url":"https://github.com/AltraMayor","followers_url":"https://api.github.com/users/AltraMayor/followers","following_url":"https://api.github.com/users/AltraMayor/following{/other_user}","gists_url":"https://api.github.com/users/AltraMayor/gists{/gist_id}","starred_url":"https://api.github.com/users/AltraMayor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AltraMayor/subscriptions","organizations_url":"https://api.github.com/users/AltraMayor/orgs","repos_url":"https://api.github.com/users/AltraMayor/repos","events_url":"https://api.github.com/users/AltraMayor/events{/privacy}","received_events_url":"https://api.github.com/users/AltraMayor/received_events","type":"User","site_admin":false},"created_at":"2015-01-01T17:41:59Z","updated_at":"2015-01-01T17:41:59Z","body":"Hi @qubodup,\r\n\r\nAs far as I can tell, it seems that one of the assumptions that libparted makes is being broken by the fake drive. But I still need more information to nail it. I describe three ways to gather more information below. If you can't do one of them, it's fine; the needed information may be already available in another method.\r\n\r\n1) Executing f3fix with the following command:\r\n\r\n\\# ltrace -S --output f3fix-trace-log -- f3fix --last-sec=15730479 /dev/sdb\r\n\r\nYou can interrupt the execution after the first minute of execution. The file f3fix-trace-log may be very large, so you may need to upload it somewhere and post the link to it.\r\n\r\n2) If you know how to install a libparted on your machine with debug information, please run f3fix with gdb for one minute, and after the ^C, go a few lines with command \"n\" of gdb would give me a better clue where libparted is looping \"forever\".\r\n\r\n3) Add line \"disk->needs_clobber = 0;\" just before line \"ret = ped_disk_commit(disk);\" in file f3fix.c, compile it with \"make experimental\", and test f3fix on your fake drive. If it works, we at least narrow where the problem must be in libparted. After editing f3fix.c, you should get the following diff:\r\n<pre>\r\n$ git diff\r\ndiff --git a/f3fix.c b/f3fix.c\r\nindex 685d8db..142c68d 100644\r\n--- a/f3fix.c\r\n+++ b/f3fix.c\r\n@@ -225,6 +225,7 @@ static int fix_disk(PedDevice *dev, PedDiskType *type,\r\n                goto part;\r\n        /* ped_disk_print(disk); */\r\n \r\n+       disk->needs_clobber = 0;\r\n        ret = ped_disk_commit(disk);\r\n        goto disk;\r\n</pre>\r\n \r\nHappy new year!"}}