mosys segfaults on platforms with no SKU information |
|||||||
Issue descriptionChrome Version: (copy from chrome://version) OS: (e.g. Win7, OSX 10.9.5, etc...) What steps will reproduce the problem? (1) Boot kahlee (2) Look at /var/log/messages, notice "mosys[6243]: segfault at..." messages. What is the expected result? mosys shouldn't segfault. What happens instead? Please use labels and text to provide additional information. For graphics-related bugs, please copy/paste the contents of the about:gpu page at the end of this report.
,
Nov 22 2017
I think the problem is that kahlee should be using cros_config to read its SKU map. But still, mosys should not crash the way it is now. I can take a look later today.
,
Nov 22 2017
,
Nov 27 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/mosys/+/1ce8a45d28bf5f7078e15cf912640fca7b3cbeaf commit 1ce8a45d28bf5f7078e15cf912640fca7b3cbeaf Author: Simon Glass <sjg@chromium.org> Date: Mon Nov 27 17:45:11 2017 Avoid a crash on platforms with no SKU information At present 'mosys platform signature' assumes that SKU information is present and crashes if it is not. This command is normally used only with unified builds, but there is no guarantee that the board actually uses cro_config to read the SKU information. Fix this by adding a NULL check. BUG= chromium:787879 BRANCH=none TEST=manual test on kahlee Change-Id: Ifdb351b0dfeaafecd810153d5c851d44edcd514b Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/786133 [modify] https://crrev.com/1ce8a45d28bf5f7078e15cf912640fca7b3cbeaf/lib/misc/sku.c
,
Nov 28 2017
,
Jan 8 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/mosys/+/3e3744b15fb3cd1dc759890f68b723ef240ed8c1 commit 3e3744b15fb3cd1dc759890f68b723ef240ed8c1 Author: Simon Glass <sjg@chromium.org> Date: Mon Jan 08 10:18:12 2018 kahlee: Use cros_config to obtain SKU information Kahlee uses unified builds so we should switch it to use cros_config to obtain its SKU information. To make this work we need to make sure that kahlee support is only built in if we have CONFIG_CROS_CONFIG defined. Unfortunately mosys uses an old version of kconfig so it does not seem possible to do what we do with the kernel (make oldnconfig). I'm not sure how to work around that other than by adjusting the Makefile. BUG= chromium:787879 BRANCH=none TEST=manual test on kahlee Change-Id: Iecda9568c690f42602dd5fd2286a5db2b6cf1498 Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/786134 Reviewed-by: Jason Clinton <jclinton@chromium.org> [modify] https://crrev.com/3e3744b15fb3cd1dc759890f68b723ef240ed8c1/platform/platform_list.c [modify] https://crrev.com/3e3744b15fb3cd1dc759890f68b723ef240ed8c1/platform/kahlee/sys.c [modify] https://crrev.com/3e3744b15fb3cd1dc759890f68b723ef240ed8c1/platform/kahlee/kahlee.c
,
Jan 22 2018
,
Jan 23 2018
,
Jan 26 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/mosys/+/f44116e0f9e10fe7aab332170a7337b8805c7f3e commit f44116e0f9e10fe7aab332170a7337b8805c7f3e Author: Simon Glass <sjg@chromium.org> Date: Fri Jan 26 03:23:45 2018 Capitalise the platform names The SMBIOS names have a capital letter at the start in current boards. Update the tests to respect this convention, to avoid confusion. BUG= chromium:787879 BRANCH=none TEST=FEATURES=test emerge-coral --nodeps -q mosys Change-Id: I79e5e3305fff3e94d01ee27d071a9d8b20708fe5 Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/887166 Reviewed-by: Jason Clinton <jclinton@chromium.org> [modify] https://crrev.com/f44116e0f9e10fe7aab332170a7337b8805c7f3e/tests/test_config.dts [modify] https://crrev.com/f44116e0f9e10fe7aab332170a7337b8805c7f3e/tests/simple_tests.c
,
Jan 26 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/mosys/+/74e541a215df29ca58fa647106a9f101625c3914 commit 74e541a215df29ca58fa647106a9f101625c3914 Author: Simon Glass <sjg@chromium.org> Date: Fri Jan 26 03:23:45 2018 Correct a bug in string_in_list() Unfortunately this function had a rather egregious bug which was not detected by tests. Fix it and add a test. BUG= chromium:787879 , b:72397172 BRANCH=none TEST=FEATURES=test emerge-coral --nodeps -q mosys Change-Id: I7c907526b282143cb89679312c2f4db5ce6c54a4 Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/887167 Tested-by: YH Lin <yueherngl@chromium.org> Reviewed-by: Jason Clinton <jclinton@chromium.org> Reviewed-by: YH Lin <yueherngl@chromium.org> Reviewed-by: Patrick Berny <pberny@chromium.org> [modify] https://crrev.com/74e541a215df29ca58fa647106a9f101625c3914/lib/cros_config/cros_config.c [modify] https://crrev.com/74e541a215df29ca58fa647106a9f101625c3914/tests/simple_tests.c
,
Jan 29 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/mosys/+/e195a22d9f5bfc68059d6c392fc436fd96719e33 commit e195a22d9f5bfc68059d6c392fc436fd96719e33 Author: Simon Glass <sjg@chromium.org> Date: Mon Jan 29 20:59:08 2018 Correct a bug in string_in_list() Unfortunately this function had a rather egregious bug which was not detected by tests. Fix it and add a test. BUG= chromium:787879 , b:72397172 BRANCH=none TEST=FEATURES=test emerge-coral --nodeps -q mosys Change-Id: I7c907526b282143cb89679312c2f4db5ce6c54a4 Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/887167 Tested-by: YH Lin <yueherngl@chromium.org> Reviewed-by: Jason Clinton <jclinton@chromium.org> Reviewed-by: YH Lin <yueherngl@chromium.org> Reviewed-by: Patrick Berny <pberny@chromium.org> (cherry picked from commit 74e541a215df29ca58fa647106a9f101625c3914) Reviewed-on: https://chromium-review.googlesource.com/890387 Trybot-Ready: Patrick Berny <pberny@chromium.org> Commit-Queue: YH Lin <yueherngl@chromium.org> [modify] https://crrev.com/e195a22d9f5bfc68059d6c392fc436fd96719e33/lib/cros_config/cros_config.c [modify] https://crrev.com/e195a22d9f5bfc68059d6c392fc436fd96719e33/tests/simple_tests.c
,
Jan 30 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/mosys/+/d0ae9b7ae0094a67c6fa9024e7f8da9a48095888 commit d0ae9b7ae0094a67c6fa9024e7f8da9a48095888 Author: Simon Glass <sjg@chromium.org> Date: Tue Jan 30 21:16:45 2018 Capitalise the platform names The SMBIOS names have a capital letter at the start in current boards. Update the tests to respect this convention, to avoid confusion. BUG= chromium:787879 BRANCH=none TEST=FEATURES=test emerge-coral --nodeps -q mosys Change-Id: I79e5e3305fff3e94d01ee27d071a9d8b20708fe5 Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/887166 Reviewed-by: Jason Clinton <jclinton@chromium.org> (cherry picked from commit f44116e0f9e10fe7aab332170a7337b8805c7f3e) Reviewed-on: https://chromium-review.googlesource.com/893621 Reviewed-by: Patrick Berny <pberny@chromium.org> Reviewed-by: YH Lin <yueherngl@chromium.org> Tested-by: YH Lin <yueherngl@chromium.org> Commit-Queue: YH Lin <yueherngl@chromium.org> [modify] https://crrev.com/d0ae9b7ae0094a67c6fa9024e7f8da9a48095888/tests/test_config.dts [modify] https://crrev.com/d0ae9b7ae0094a67c6fa9024e7f8da9a48095888/tests/simple_tests.c
,
Feb 6 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/mosys/+/4c3d3d067d6109b04bc2a0f506e701991add686d commit 4c3d3d067d6109b04bc2a0f506e701991add686d Author: Simon Glass <sjg@chromium.org> Date: Tue Feb 06 06:21:09 2018 Capitalise the platform names The SMBIOS names have a capital letter at the start in current boards. Update the tests to respect this convention, to avoid confusion. BUG= chromium:787879 BRANCH=none TEST=FEATURES=test emerge-coral --nodeps -q mosys Change-Id: I79e5e3305fff3e94d01ee27d071a9d8b20708fe5 Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/887166 Reviewed-by: Jason Clinton <jclinton@chromium.org> (cherry picked from commit f44116e0f9e10fe7aab332170a7337b8805c7f3e) Reviewed-on: https://chromium-review.googlesource.com/903249 Commit-Queue: Patrick Berny <pberny@chromium.org> Tested-by: Patrick Berny <pberny@chromium.org> Trybot-Ready: Patrick Berny <pberny@chromium.org> [modify] https://crrev.com/4c3d3d067d6109b04bc2a0f506e701991add686d/tests/test_config.dts [modify] https://crrev.com/4c3d3d067d6109b04bc2a0f506e701991add686d/tests/simple_tests.c
,
Feb 6 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/mosys/+/a4e0345a31da9572ede46f4ab03ad6a7725a730f commit a4e0345a31da9572ede46f4ab03ad6a7725a730f Author: Simon Glass <sjg@chromium.org> Date: Tue Feb 06 06:24:38 2018 Correct a bug in string_in_list() Unfortunately this function had a rather egregious bug which was not detected by tests. Fix it and add a test. BUG= chromium:787879 , b:72397172 BRANCH=none TEST=FEATURES=test emerge-coral --nodeps -q mosys Change-Id: I7c907526b282143cb89679312c2f4db5ce6c54a4 Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/887167 Tested-by: YH Lin <yueherngl@chromium.org> Reviewed-by: Jason Clinton <jclinton@chromium.org> Reviewed-by: YH Lin <yueherngl@chromium.org> Reviewed-by: Patrick Berny <pberny@chromium.org> (cherry picked from commit 74e541a215df29ca58fa647106a9f101625c3914) Reviewed-on: https://chromium-review.googlesource.com/903254 Commit-Queue: Patrick Berny <pberny@chromium.org> Tested-by: Patrick Berny <pberny@chromium.org> Trybot-Ready: Patrick Berny <pberny@chromium.org> [modify] https://crrev.com/a4e0345a31da9572ede46f4ab03ad6a7725a730f/lib/cros_config/cros_config.c [modify] https://crrev.com/a4e0345a31da9572ede46f4ab03ad6a7725a730f/tests/simple_tests.c
,
Mar 27 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/mosys/+/cd790f22cb0a237cc0010b8cfa545ee000a140c8 commit cd790f22cb0a237cc0010b8cfa545ee000a140c8 Author: Simon Glass <sjg@chromium.org> Date: Tue Mar 27 01:18:45 2018 Capitalise the platform names The SMBIOS names have a capital letter at the start in current boards. Update the tests to respect this convention, to avoid confusion. BUG= chromium:787879 BRANCH=none TEST=FEATURES=test emerge-coral --nodeps -q mosys Change-Id: I79e5e3305fff3e94d01ee27d071a9d8b20708fe5 Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/887166 Reviewed-by: Jason Clinton <jclinton@chromium.org> (cherry picked from commit f44116e0f9e10fe7aab332170a7337b8805c7f3e) Reviewed-on: https://chromium-review.googlesource.com/981254 Commit-Queue: YH Lin <yueherngl@chromium.org> Tested-by: YH Lin <yueherngl@chromium.org> [modify] https://crrev.com/cd790f22cb0a237cc0010b8cfa545ee000a140c8/tests/test_config.dts [modify] https://crrev.com/cd790f22cb0a237cc0010b8cfa545ee000a140c8/tests/simple_tests.c
,
Mar 27 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/mosys/+/3910aa22ee45cb2220c4697181c54940426ff73a commit 3910aa22ee45cb2220c4697181c54940426ff73a Author: Simon Glass <sjg@chromium.org> Date: Tue Mar 27 01:18:46 2018 Correct a bug in string_in_list() Unfortunately this function had a rather egregious bug which was not detected by tests. Fix it and add a test. BUG= chromium:787879 , b:72397172 BRANCH=none TEST=FEATURES=test emerge-coral --nodeps -q mosys Change-Id: I7c907526b282143cb89679312c2f4db5ce6c54a4 Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/887167 Tested-by: YH Lin <yueherngl@chromium.org> Reviewed-by: Jason Clinton <jclinton@chromium.org> Reviewed-by: YH Lin <yueherngl@chromium.org> Reviewed-by: Patrick Berny <pberny@chromium.org> (cherry picked from commit 74e541a215df29ca58fa647106a9f101625c3914) Reviewed-on: https://chromium-review.googlesource.com/981255 Commit-Queue: YH Lin <yueherngl@chromium.org> [modify] https://crrev.com/3910aa22ee45cb2220c4697181c54940426ff73a/lib/cros_config/cros_config.c [modify] https://crrev.com/3910aa22ee45cb2220c4697181c54940426ff73a/tests/simple_tests.c |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by cra...@chromium.org
, Nov 22 2017Through some magic we compiled a mosys binary with debug symbols, which produced the following stack trace/gdb sessions: (gdb) run -k platform id Starting program: /usr/sbin/mosys -k platform id vendor="Google" name="Kahlee" model="kahlee" chassis="KAHLEE" customization="KAHLEE" Program received signal SIGSEGV, Segmentation fault. 0x00005555555aa05c in sku_get_signature_id () (gdb) where #0 0x00005555555aa05c in sku_get_signature_id () #1 0x00005555555735ce in platform_generic_identifier_cmd () #2 0x00005555555732fb in platform_signature_cmd () #3 0x000055555557306d in platform_id_cmd () #4 0x000055555556e55a in sub_main (intf=<optimized out>, sub=0x5555555d3bc0 <platform_cmds>, argc=0, argv=0x7fffffffe518) at mosys.c:105 #5 intf_main (intf=<optimized out>, argc=0, argv=<optimized out>) at mosys.c:180 #6 mosys_main (argc=<optimized out>, argv=0x7fff00000001) at mosys.c:295 #7 0x00007ffff7a4d736 in __libc_start_main (main=0x55555556e590 <main>, argc=4, argv=0x7fffffffe4f8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe4e8) at ../csu/libc-start.c:289 #8 0x000055555556dd89 in _start () Also, bisecting the changelog in mosys, I see that this change introduced the problem: https://chromium-review.googlesource.com/770652