GNU GRUB - Bugs: bug #44448, grub refuses to load (or...
You are not allowed to post comments on this tracker with your current authentication level.
bug #44448: grub refuses to load (or recognize) a freebsd module -- "file not found"
Submitter: | Kostya Berger <bergerkos> | ||
Submitted: | Fri 06 Mar 2015 12:44:42 PM UTC | ||
Category: | Filesystem | Severity: | Major |
Priority: | 5 - Normal | Item Group: | Software Error |
Status: | Fixed | Privacy: | Public |
Assigned to: | None | Originator Name: | Kostya Berger |
Open/Closed: | Closed | Release: | Git master |
Release: | Reproducibility: | None | |
Planned Release: | None |
Jump to the original submission
Thu 14 May 2015 08:47:35 AM UTC, comment #42: |
Kostya Berger <bergerkos> |
Thu 14 May 2015 04:52:11 AM UTC, comment #41: Fixed in 5370dcfdae66b60cff3507ad925300a679fe4117. Thank you! |
Andrei Borzenkov <arvidjaar> |
Wed 13 May 2015 06:49:52 PM UTC, comment #40: Will you commit this now? Or should other tests be done? |
Kostya Berger <bergerkos> |
Wed 13 May 2015 06:47:25 PM UTC, comment #39: Yes, it does. Thank you very much for assistance. |
Kostya Berger <bergerkos> |
Wed 13 May 2015 03:25:33 PM UTC, comment #38: Yes, size was truncated. Please revert previous patch and test this one - should fix it. |
Andrei Borzenkov <arvidjaar> |
Wed 13 May 2015 12:30:15 PM UTC, comment #37: Tested, not showing the file yet. Here's the log. |
Kostya Berger <bergerkos> |
Tue 12 May 2015 03:19:15 PM UTC, comment #36: Please test with attached patch (which shows size before shift). Attach usual debug log from attempt to list non-existing file. |
Andrei Borzenkov <arvidjaar> |
Tue 12 May 2015 01:46:25 PM UTC, comment #35: Well, I don't know how to check the overflow of any variables, sorry. I can only state that reverting this small change in gurb-core/fs/zfs/zfs.c in the latest git code makes everything work again.
|
Kostya Berger <bergerkos> |
Tue 12 May 2015 01:29:28 PM UTC, comment #34: ah, ok, i think i can see what is going on there -- the mzap itself has indeed number of chunks defined as 16bit int, meaning that single mzap entry can not have more; however, in case of large directory, there are probably more mzap entries in use and chopping chunks local variable to 16bits will break browsing large directories as the zap lookup will overflow the chunks counter. to debug that, one would need large directory and check the overflow of the now 16bit variables - i have strong feeling that ones in zap_lookup() may be the root cause of this regression. |
Toomas Soome <tsoome> |
Tue 12 May 2015 12:54:36 PM UTC, comment #33: So, here is my result:
|
Kostya Berger <bergerkos> |
Tue 12 May 2015 10:42:07 AM UTC, comment #32: OK got it. |
Kostya Berger <bergerkos> |
Tue 12 May 2015 10:33:34 AM UTC, comment #31: Th problem with git bisect command is that it doesn't recognize the version of 2.02~beta2:
|
Kostya Berger <bergerkos> |
Thu 07 May 2015 01:17:17 PM UTC, comment #30: arvidjaar: Thanks for your detailed recommendation on git bisect. I'll try as soon as I have time. |
Kostya Berger <bergerkos> |
Thu 07 May 2015 01:16:40 PM UTC, comment #29: ok, from this debug list it appears its getting full listing without the errors, did you compare this full listing with real ls command output? was there anything missing? at least the zfs.ko, which was used in some previous examples was listed there.
|
Toomas Soome <tsoome> |
Thu 07 May 2015 12:16:36 PM UTC, comment #28: OK, attached the output of the command:
|
Kostya Berger <bergerkos> |
Thu 07 May 2015 11:51:51 AM UTC, comment #27: ok, thanks, the code is the same.
|
Toomas Soome <tsoome> |
Thu 07 May 2015 10:12:05 AM UTC, comment #26: I've emailed you the zfs.c.
|
Kostya Berger <bergerkos> |
Thu 07 May 2015 08:53:14 AM UTC, comment #25: just to clarify why i'm insisting to check with extendible dataset patch - since freebsd zfs does implement it, it may be the case the actual write did use this feature but did not update feature flag properly, in which case the updated read test would succeed and then we can conclude its bug with freebsd zfs module. if its still unable to find the file(s), then we have to dig deeper to find out whats going on there. |
Toomas Soome <tsoome> |
Thu 07 May 2015 08:35:17 AM UTC, comment #24: Were you able to apply the patch cleanly and can you mail me the zfs.c?
|
Toomas Soome <tsoome> |
Thu 07 May 2015 06:34:05 AM UTC, comment #23: No. It works for my other pool, which doesn't have these features enabled.
|
Kostya Berger <bergerkos> |
Tue 05 May 2015 04:13:07 PM UTC, comment #22: If you are sure it worked in 2.02~beta2 then as I already told you the most straightforward way to find out when it got broken is git bisect (http://git-scm.com/docs/git-bisect)
|
Andrei Borzenkov <arvidjaar> |
Tue 05 May 2015 04:08:36 PM UTC, comment #21: just for future reference; your current grub-fstest ls command fails because you are running it as "ls /boot/kernel", but you need to run it as "ls /@/boot/kernel" - the boot is directory on dataset, and dataset root is specified by /@/. or if you wanna list files on poolname/ROOT/dataset/boot/kernel, you need to use "ls ROOT/dataset/@/boot/kernel" - thats assuming you have dataset tree as pool/ROOT/dataset and inside it you have normal directory tree /boot/kernel. |
Toomas Soome <tsoome> |
Tue 05 May 2015 02:26:42 PM UTC, comment #20: Yes, please, post it in git format or something. Copy pasting causes line breaking sometimes, so there appear "lines" that aren't present in the code. |
Kostya Berger <bergerkos> |
Tue 05 May 2015 02:20:33 PM UTC, comment #19: uh, which part were left out? i can post you git format-patch, so you should get it applied clean and we can be sure we are on the same code base:) |
Toomas Soome <tsoome> |
Tue 05 May 2015 02:07:38 PM UTC, comment #18: Sorry, there was a typo in the command ("goot" instead of "boot"). With the typo corrected the output is like this:
|
Kostya Berger <bergerkos> |
Tue 05 May 2015 01:57:15 PM UTC, comment #17: Yes, I applied some parts manually. Here's the output:
|
Kostya Berger <bergerkos> |
Tue 05 May 2015 01:49:23 PM UTC, comment #16: so, do i understand correctly, you were able to apply the patch and it did not solve it? if so, can you post debug output from it? |
Toomas Soome <tsoome> |
Tue 05 May 2015 01:39:15 PM UTC, comment #15: Sorry, the patch doesn't help. BTW, the patch as you've posted it is malformed. Must be a copy-pasting error...
|
Kostya Berger <bergerkos> |
Tue 05 May 2015 12:55:51 PM UTC, comment #14: can you grab patch from https://lists.gnu.org/archive/html/grub-devel/2015-04/msg00055.html and test it against version from git?
|
Toomas Soome <tsoome> |
Tue 05 May 2015 12:35:00 PM UTC, comment #13: OK, this time things are "better": I can copy the files linux.ko, opensolaris.ko, zfs.ko (along with the corresponsing *.symbols files) over to a small custom directory, THEN grub2 can see and load these modules.
|
Kostya Berger <bergerkos> |
Tue 05 May 2015 09:21:10 AM UTC, comment #12: Can you still install using 2.02~beta2 (to exclude some changes in your environment)? If yes, please open separate bug report for grub-install issue; include full command invocation and its output as well grub-install --debug output.
|
Andrei Borzenkov <arvidjaar> |
Tue 05 May 2015 08:44:23 AM UTC, comment #11: Here is my log with grub-fstest -d zfs (for the problematic file):
|
Kostya Berger <bergerkos> |
Mon 04 May 2015 08:36:24 AM UTC, comment #10: can you please post zfs debug outputs; from grub itself you can set debug=zfs, with grub-fstest you can use -d zfs switch. also note that this log is pretty large, so, with grub itself you may wanna add serial output (if you have connection) to grab the whole log (terminal_output --append serial).
|
Toomas Soome <tsoome> |
Thu 19 Mar 2015 06:36:44 PM UTC, comment #9: How big is filesystem? Can you make avilable image? Alernatively, if it depends on number of files, may be you can test empty filesystem with single big directory and make image of it? Should be smaller. |
Andrei Borzenkov <arvidjaar> |
Tue 10 Mar 2015 05:03:01 AM UTC, comment #8: If problem was introduced after 2.02-beta2 and you can reliably trigger it, the easiest is to use git bisect to find out bad commit. |
Andrei Borzenkov <arvidjaar> |
Sun 08 Mar 2015 09:52:57 PM UTC, comment #7: Hm, in case I run it like
|
Kostya Berger <bergerkos> |
Sun 08 Mar 2015 08:44:56 PM UTC, comment #6: Well, here it beats me. I'm not (yet) a C programmer, so while I can figure out how to set breakpoints in gdb, I don't know how to add "top level printf" in a C program.
|
Kostya Berger <bergerkos> |
Sun 08 Mar 2015 05:58:19 AM UTC, comment #5: There are no special diagnostic options. You could either use gdb (set break point on grub_zfs_open and follow it) or simply add debugging output. Start with grub_zfs_open in grub-core/fs/zfs/zfs.c, add top level printf to see which branch is followed and drill down until you hit place which fails. |
Andrei Borzenkov <arvidjaar> |
Fri 06 Mar 2015 07:19:22 PM UTC, comment #4: What special options for debug output could I use with grub-fstest? Because I use (same as in my grub.cfg):
|
Kostya Berger <bergerkos> |
Fri 06 Mar 2015 05:41:59 PM UTC, comment #3: The difference between ls (or completion) and "ls -l" is that the latter tries to open file.
|
Andrei Borzenkov <arvidjaar> |
Fri 06 Mar 2015 04:33:36 PM UTC, comment #2: As of today, it is the current GIT muster. It says:"up-to-date with origin/master". |
Kostya Berger <bergerkos> |
Fri 06 Mar 2015 02:26:24 PM UTC, comment #1: Obligatory question did you test with current GIT master? If yes, which commit? |
Andrei Borzenkov <arvidjaar> |
Fri 06 Mar 2015 12:44:42 PM UTC, original submission:
Grub2 "cannot find" a freebsd module on boot.
|
Kostya Berger <bergerkos> |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 8 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2015-05-14 | arvidjaar | Status | None | Fixed | |
Open/Closed | Open | Closed | |||
2015-05-13 | arvidjaar | Attached File | - | Added 44448v2.patch, #34000 | |
2015-05-13 | bergerkos | Attached File | - | Added grub-fstest.log, #33998 | |
2015-05-12 | arvidjaar | Attached File | - | Added 44448.patch, #33987 | |
2015-05-07 | bergerkos | Attached File | - | Added debug.txt.bz2, #33952 | |
2015-05-07 | bergerkos | Attached File | - | Added zfs.c, #33950 | |
2015-05-05 | arvidjaar | Category | Terminal | Filesystem |
Powered by Savane 3.13-d3ae.
Corresponding source code
Thank you and everyone who helped.